File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ fn lint_inner(
155155 if let Some ( lint_root_type) = lint. root_type {
156156 if lint_root_type != root_type {
157157 skipped += 1 ;
158+ continue ;
158159 }
159160 }
160161
@@ -546,14 +547,15 @@ mod tests {
546547 let mut out = Vec :: new ( ) ;
547548 let root_type = RootType :: Running ;
548549 let r = lint_inner ( root, root_type, & mut out) . unwrap ( ) ;
549- assert_eq ! ( r. passed, LINTS . len( ) ) ;
550+ let allbut_one = LINTS . len ( ) . checked_sub ( 1 ) . unwrap ( ) ;
551+ assert_eq ! ( r. passed, allbut_one) ;
550552 assert_eq ! ( r. fatal, 0 ) ;
551553 assert_eq ! ( r. skipped, 1 ) ;
552554 assert_eq ! ( r. warnings, 0 ) ;
553555 root. create_dir_all ( "var/run/foo" ) ?;
554556 let mut out = Vec :: new ( ) ;
555557 let r = lint_inner ( root, root_type, & mut out) . unwrap ( ) ;
556- assert_eq ! ( r. passed, LINTS . len ( ) . checked_sub( 1 ) . unwrap( ) ) ;
558+ assert_eq ! ( r. passed, allbut_one . checked_sub( 1 ) . unwrap( ) ) ;
557559 assert_eq ! ( r. fatal, 1 ) ;
558560 assert_eq ! ( r. skipped, 1 ) ;
559561 assert_eq ! ( r. warnings, 0 ) ;
You can’t perform that action at this time.
0 commit comments