File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
src/lint/rules/tests/indentation Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -4,27 +4,12 @@ pub mod in4;
44pub mod in9;
55pub mod in10;
66
7- use crate :: lint:: rules:: tests:: common:: { assert_snippet, run_linter } ;
7+ use crate :: lint:: rules:: tests:: common:: assert_snippet;
88use crate :: lint:: LintCfg ;
99use crate :: lint:: LongLineOptions ;
10- use crate :: lint:: rules:: { CurrentRules , instantiate_rules} ;
11- use crate :: analysis:: LocalDMLError ;
10+ use crate :: lint:: rules:: instantiate_rules;
1211use std:: convert:: TryInto ;
1312
14- pub fn assert_indentation (
15- code : & str , expected_errors : usize , rules : CurrentRules )
16- {
17- let lint_errors = run_linter ( code, & rules) ;
18- let Ok ( ref lint_errors) = lint_errors else {
19- panic ! ( ) ;
20- } ;
21- let mut indent_errors: Vec < & LocalDMLError > = vec ! ( ) ;
22- for error in lint_errors {
23- indent_errors. push ( error) ;
24- }
25- assert_eq ! ( indent_errors. len( ) , expected_errors, "{:#?}" , lint_errors) ;
26- }
27-
2813// Line length can be configured to a maximum
2914//(defaults to 80, feature disabled)
3015pub static LONG_LINE : & str = "
You can’t perform that action at this time.
0 commit comments