|
1 | 1 | use crate::clippy_project_root; |
2 | 2 | use aho_corasick::AhoCorasickBuilder; |
3 | 3 | use itertools::Itertools; |
4 | | -use rustc_lexer::{tokenize, unescape, LiteralKind, TokenKind}; |
| 4 | +use rustc_lexer::{LiteralKind, TokenKind, tokenize, unescape}; |
5 | 5 | use std::collections::{HashMap, HashSet}; |
6 | 6 | use std::ffi::OsStr; |
7 | 7 | use std::fmt::{self, Write}; |
@@ -1048,23 +1048,17 @@ mod tests { |
1048 | 1048 | Lint::new("incorrect_match", "group1", "\"abc\"", "module_name", Range::default()), |
1049 | 1049 | ]; |
1050 | 1050 | let mut expected: HashMap<String, Vec<Lint>> = HashMap::new(); |
1051 | | - expected.insert( |
1052 | | - "group1".to_string(), |
1053 | | - vec![ |
1054 | | - Lint::new("should_assert_eq", "group1", "\"abc\"", "module_name", Range::default()), |
1055 | | - Lint::new("incorrect_match", "group1", "\"abc\"", "module_name", Range::default()), |
1056 | | - ], |
1057 | | - ); |
1058 | | - expected.insert( |
1059 | | - "group2".to_string(), |
1060 | | - vec![Lint::new( |
1061 | | - "should_assert_eq2", |
1062 | | - "group2", |
1063 | | - "\"abc\"", |
1064 | | - "module_name", |
1065 | | - Range::default(), |
1066 | | - )], |
1067 | | - ); |
| 1051 | + expected.insert("group1".to_string(), vec![ |
| 1052 | + Lint::new("should_assert_eq", "group1", "\"abc\"", "module_name", Range::default()), |
| 1053 | + Lint::new("incorrect_match", "group1", "\"abc\"", "module_name", Range::default()), |
| 1054 | + ]); |
| 1055 | + expected.insert("group2".to_string(), vec![Lint::new( |
| 1056 | + "should_assert_eq2", |
| 1057 | + "group2", |
| 1058 | + "\"abc\"", |
| 1059 | + "module_name", |
| 1060 | + Range::default(), |
| 1061 | + )]); |
1068 | 1062 | assert_eq!(expected, Lint::by_lint_group(lints.into_iter())); |
1069 | 1063 | } |
1070 | 1064 | } |
0 commit comments