mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Fix miscellaneous Clippy lints
This commit is contained in:
parent
55c0b86cde
commit
eff195852d
21 changed files with 40 additions and 51 deletions
|
@ -215,7 +215,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> String {
|
|||
.flat_map(|node| node.traits.iter().map(move |t| (t, node)))
|
||||
.into_group_map()
|
||||
.into_iter()
|
||||
.sorted_by_key(|(k, _)| k.clone())
|
||||
.sorted_by_key(|(k, _)| *k)
|
||||
.map(|(trait_name, nodes)| {
|
||||
let name = format_ident!("Any{}", trait_name);
|
||||
let trait_name = format_ident!("{}", trait_name);
|
||||
|
@ -558,12 +558,13 @@ impl Field {
|
|||
}
|
||||
|
||||
fn lower(grammar: &Grammar) -> AstSrc {
|
||||
let mut res = AstSrc::default();
|
||||
|
||||
res.tokens = "Whitespace Comment String ByteString IntNumber FloatNumber"
|
||||
.split_ascii_whitespace()
|
||||
.map(|it| it.to_string())
|
||||
.collect::<Vec<_>>();
|
||||
let mut res = AstSrc {
|
||||
tokens: "Whitespace Comment String ByteString IntNumber FloatNumber"
|
||||
.split_ascii_whitespace()
|
||||
.map(|it| it.to_string())
|
||||
.collect::<Vec<_>>(),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let nodes = grammar.iter().collect::<Vec<_>>();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue