mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +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
|
@ -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