File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
crates/ra_project_model/src Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -421,19 +421,14 @@ fn find_cargo_toml_down_the_fs(path: &Path) -> Option<PathBuf> {
421421}
422422
423423fn 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 }
You can’t perform that action at this time.
0 commit comments