mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
remove redundant clones
This commit is contained in:
parent
f595e60b6d
commit
476e10e961
23 changed files with 34 additions and 34 deletions
|
@ -1093,7 +1093,7 @@ impl Field {
|
|||
|
||||
pub fn layout(&self, db: &dyn HirDatabase) -> Result<Layout, LayoutError> {
|
||||
db.layout_of_ty(
|
||||
self.ty(db).ty.clone(),
|
||||
self.ty(db).ty,
|
||||
db.trait_environment(match hir_def::VariantId::from(self.parent) {
|
||||
hir_def::VariantId::EnumVariantId(id) => GenericDefId::EnumVariantId(id),
|
||||
hir_def::VariantId::StructId(id) => GenericDefId::AdtId(id.into()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue