Skip to content

Commit ec80e6b

Browse files
committed
switch to ignore::walk for fmt/check
1 parent 245ca9b commit ec80e6b

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

packages/cli/src/cli/check.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use crate::BuildRequest;
88
use anyhow::Context;
99
use futures_util::{stream::FuturesUnordered, StreamExt};
1010
use std::path::Path;
11-
use walkdir::WalkDir;
1211

1312
/// Check the Rust files in the project for issues.
1413
#[derive(Clone, Debug, Parser)]
@@ -125,8 +124,7 @@ async fn check_files_and_report(files_to_check: Vec<PathBuf>) -> Result<()> {
125124
}
126125

127126
pub(crate) fn collect_rs_files(folder: &Path, files: &mut Vec<PathBuf>) {
128-
let dir = WalkDir::new(folder).follow_links(true).into_iter();
129-
for entry in dir.flatten() {
127+
for entry in ignore::Walk::new(folder).flatten() {
130128
if entry.path().extension() == Some("rs".as_ref()) {
131129
files.push(entry.path().to_path_buf());
132130
}

packages/cli/src/workspace.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,6 @@ impl Workspace {
348348
let mut ignore_builder = ignore::gitignore::GitignoreBuilder::new(workspace_dir);
349349
ignore_builder.add(workspace_dir.join(".gitignore"));
350350

351-
// todo!()
352-
// let workspace_dir = self.workspace_dir();
353-
// ignore_builder.add(workspace_dir.join(".gitignore"));
354-
355351
for path in Self::default_ignore_list() {
356352
ignore_builder
357353
.add_line(None, path)

0 commit comments

Comments
 (0)