mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
ide-assists: Fix warnings about clippy str_to_string
rule
This commit is contained in:
parent
b89a4038c9
commit
80e684254d
18 changed files with 25 additions and 25 deletions
|
@ -202,7 +202,7 @@ fn get_adt_source(
|
|||
let file = ctx.sema.parse(range.file_id);
|
||||
let adt_source =
|
||||
ctx.sema.find_node_at_offset_with_macros(file.syntax(), range.range.start())?;
|
||||
find_struct_impl(ctx, &adt_source, &[fn_name.to_string()]).map(|impl_| (impl_, range.file_id))
|
||||
find_struct_impl(ctx, &adt_source, &[fn_name.to_owned()]).map(|impl_| (impl_, range.file_id))
|
||||
}
|
||||
|
||||
struct FunctionTemplate {
|
||||
|
@ -1007,7 +1007,7 @@ fn fn_arg_name(sema: &Semantics<'_, RootDatabase>, arg_expr: &ast::Expr) -> Stri
|
|||
name
|
||||
}
|
||||
Some(name) => name,
|
||||
None => "arg".to_string(),
|
||||
None => "arg".to_owned(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue