mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
remove more redundant clones manually
This commit is contained in:
parent
476e10e961
commit
b22bd36f6e
4 changed files with 3 additions and 5 deletions
|
@ -79,7 +79,7 @@ pub(crate) fn goto_definition(
|
|||
return Some(vec![x]);
|
||||
}
|
||||
|
||||
if let Some(x) = try_lookup_macro_def_in_macro_use(sema, token.clone()) {
|
||||
if let Some(x) = try_lookup_macro_def_in_macro_use(sema, token) {
|
||||
return Some(vec![x]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ impl FieldOrTupleIdx {
|
|||
.as_str()
|
||||
.map(|s| s.to_owned())
|
||||
.unwrap_or_else(|| format!(".{}", f.name(db).as_tuple_index().unwrap())),
|
||||
FieldOrTupleIdx::TupleIdx(i) => format!(".{i}").to_owned(),
|
||||
FieldOrTupleIdx::TupleIdx(i) => format!(".{i}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ pub(crate) fn view_memory_layout(
|
|||
|
||||
let mut nodes = vec![MemoryLayoutNode {
|
||||
item_name,
|
||||
typename: typename.clone(),
|
||||
typename,
|
||||
size: layout.size(),
|
||||
offset: 0,
|
||||
alignment: layout.align(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue