File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -665,16 +665,6 @@ fn lintcheck_needs_rerun(lintcheck_logs_path: &Path) -> bool {
665665 logs_modified < clippy_modified
666666}
667667
668- fn is_in_clippy_root ( ) -> bool {
669- if let Ok ( pb) = std:: env:: current_dir ( ) {
670- if let Some ( file) = pb. file_name ( ) {
671- return file == PathBuf :: from ( "rust-clippy" ) ;
672- }
673- }
674-
675- false
676- }
677-
678668/// lintchecks `main()` function
679669///
680670/// # Panics
@@ -683,7 +673,7 @@ fn is_in_clippy_root() -> bool {
683673/// or if lintcheck is executed from the wrong directory (aka none-repo-root)
684674pub fn main ( ) {
685675 // assert that we launch lintcheck from the repo root (via cargo lintcheck)
686- if ! is_in_clippy_root ( ) {
676+ if std :: fs :: metadata ( "lintcheck/Cargo.toml" ) . is_err ( ) {
687677 eprintln ! ( "lintcheck needs to be run from clippys repo root!\n Use `cargo lintcheck` alternatively." ) ;
688678 std:: process:: exit ( 3 ) ;
689679 }
You can’t perform that action at this time.
0 commit comments