Skip to content

Commit f1b7349

Browse files
committed
clean up
1 parent 39bd3b2 commit f1b7349

File tree

1 file changed

+2
-7
lines changed
  • crates/ra_project_model/src

1 file changed

+2
-7
lines changed

crates/ra_project_model/src/lib.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -421,19 +421,14 @@ fn find_cargo_toml_down_the_fs(path: &Path) -> Option<PathBuf> {
421421
}
422422

423423
fn find_cargo_toml_up_the_fs(path: &Path) -> Option<PathBuf> {
424-
log::info!("find_cargo_toml_up_the_fs()");
425424
let entities = match read_dir(path) {
426425
Ok(entities) => entities,
427-
Err(e) => {
428-
log::info!("err {}", e);
429-
return None
430-
}
426+
Err(_) => return None
431427
};
432428

433-
log::info!("entities: {:?}", entities);
429+
// Only one level up to avoid cycles the easy way and stop a runaway scan with large projects
434430
for entity in entities.filter_map(Result::ok) {
435431
let candidate = entity.path().join("Cargo.toml");
436-
log::info!("candidate: {:?}, exists: {}", candidate, candidate.exists());
437432
if candidate.exists() {
438433
return Some(candidate);
439434
}

0 commit comments

Comments
 (0)