mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
ide: Fix warnings about clippy str_to_string
rule
This commit is contained in:
parent
bb0de88f24
commit
8c2f301a41
17 changed files with 38 additions and 41 deletions
|
@ -621,7 +621,7 @@ fn closure_ty(
|
|||
})
|
||||
.join("\n");
|
||||
if captures_rendered.trim().is_empty() {
|
||||
captures_rendered = "This closure captures nothing".to_string();
|
||||
captures_rendered = "This closure captures nothing".to_owned();
|
||||
}
|
||||
let mut targets: Vec<hir::ModuleDef> = Vec::new();
|
||||
let mut push_new_def = |item: hir::ModuleDef| {
|
||||
|
@ -823,7 +823,7 @@ fn keyword_hints(
|
|||
}
|
||||
}
|
||||
_ => KeywordHint {
|
||||
description: token.text().to_string(),
|
||||
description: token.text().to_owned(),
|
||||
keyword_mod,
|
||||
actions: Vec::new(),
|
||||
},
|
||||
|
@ -835,9 +835,9 @@ fn keyword_hints(
|
|||
Some(_) => format!("prim_{}", token.text()),
|
||||
None => format!("{}_keyword", token.text()),
|
||||
};
|
||||
KeywordHint::new(token.text().to_string(), module)
|
||||
KeywordHint::new(token.text().to_owned(), module)
|
||||
}
|
||||
T![Self] => KeywordHint::new(token.text().to_string(), "self_upper_keyword".into()),
|
||||
_ => KeywordHint::new(token.text().to_string(), format!("{}_keyword", token.text())),
|
||||
T![Self] => KeywordHint::new(token.text().to_owned(), "self_upper_keyword".into()),
|
||||
_ => KeywordHint::new(token.text().to_owned(), format!("{}_keyword", token.text())),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue