From f1b7349e7a929cd55f916fc6cdfa171467ac897d Mon Sep 17 00:00:00 2001 From: nmio Date: Tue, 25 Feb 2020 20:56:24 +0000 Subject: clean up --- crates/ra_project_model/src/lib.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'crates/ra_project_model/src') diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs index a8594a697..cfebf36f8 100644 --- a/crates/ra_project_model/src/lib.rs +++ b/crates/ra_project_model/src/lib.rs @@ -421,19 +421,14 @@ fn find_cargo_toml_down_the_fs(path: &Path) -> Option { } fn find_cargo_toml_up_the_fs(path: &Path) -> Option { - log::info!("find_cargo_toml_up_the_fs()"); let entities = match read_dir(path) { Ok(entities) => entities, - Err(e) => { - log::info!("err {}", e); - return None - } + Err(_) => return None }; - log::info!("entities: {:?}", entities); + // Only one level up to avoid cycles the easy way and stop a runaway scan with large projects for entity in entities.filter_map(Result::ok) { let candidate = entity.path().join("Cargo.toml"); - log::info!("candidate: {:?}, exists: {}", candidate, candidate.exists()); if candidate.exists() { return Some(candidate); } -- cgit v1.2.3