mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
ide-diagnostics: Fix warnings about clippy str_to_string
rule
This commit is contained in:
parent
eba1b13295
commit
d00f1c1b16
22 changed files with 36 additions and 36 deletions
|
@ -42,12 +42,12 @@ impl State {
|
|||
v.push("Deserialize");
|
||||
}
|
||||
match v.as_slice() {
|
||||
[] => "".to_string(),
|
||||
[] => "".to_owned(),
|
||||
[x] => format!("#[derive({x})]\n"),
|
||||
[x, y] => format!("#[derive({x}, {y})]\n"),
|
||||
_ => {
|
||||
never!();
|
||||
"".to_string()
|
||||
"".to_owned()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ mod tests {
|
|||
#[test]
|
||||
fn diagnostic_for_simple_case() {
|
||||
let mut config = DiagnosticsConfig::test_sample();
|
||||
config.disabled.insert("syntax-error".to_string());
|
||||
config.disabled.insert("syntax-error".to_owned());
|
||||
check_diagnostics_with_config(
|
||||
config,
|
||||
r#"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue