Skip to content

Commit 39ba498

Browse files
authored
Merge pull request #18793 from ChayimFriedman2/fixup
minor: Remove unneeded conversions
2 parents 4a1c7d1 + b4ad30d commit 39ba498

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

‎src/tools/rust-analyzer/crates/hir/src/semantics.rs‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -246,59 +246,59 @@ impl<DB: HirDatabase> Semantics<'_, DB> {
246246
}
247247

248248
pubfnto_adt_def(&self,a:&ast::Adt) -> Option<Adt>{
249-
self.imp.to_def(a).map(Adt::from)
249+
self.imp.to_def(a)
250250
}
251251

252252
pubfnto_const_def(&self,c:&ast::Const) -> Option<Const>{
253-
self.imp.to_def(c).map(Const::from)
253+
self.imp.to_def(c)
254254
}
255255

256256
pubfnto_enum_def(&self,e:&ast::Enum) -> Option<Enum>{
257-
self.imp.to_def(e).map(Enum::from)
257+
self.imp.to_def(e)
258258
}
259259

260260
pubfnto_enum_variant_def(&self,v:&ast::Variant) -> Option<Variant>{
261-
self.imp.to_def(v).map(Variant::from)
261+
self.imp.to_def(v)
262262
}
263263

264264
pubfnto_fn_def(&self,f:&ast::Fn) -> Option<Function>{
265-
self.imp.to_def(f).map(Function::from)
265+
self.imp.to_def(f)
266266
}
267267

268268
pubfnto_impl_def(&self,i:&ast::Impl) -> Option<Impl>{
269-
self.imp.to_def(i).map(Impl::from)
269+
self.imp.to_def(i)
270270
}
271271

272272
pubfnto_macro_def(&self,m:&ast::Macro) -> Option<Macro>{
273-
self.imp.to_def(m).map(Macro::from)
273+
self.imp.to_def(m)
274274
}
275275

276276
pubfnto_module_def(&self,m:&ast::Module) -> Option<Module>{
277-
self.imp.to_def(m).map(Module::from)
277+
self.imp.to_def(m)
278278
}
279279

280280
pubfnto_static_def(&self,s:&ast::Static) -> Option<Static>{
281-
self.imp.to_def(s).map(Static::from)
281+
self.imp.to_def(s)
282282
}
283283

284284
pubfnto_struct_def(&self,s:&ast::Struct) -> Option<Struct>{
285-
self.imp.to_def(s).map(Struct::from)
285+
self.imp.to_def(s)
286286
}
287287

288288
pubfnto_trait_alias_def(&self,t:&ast::TraitAlias) -> Option<TraitAlias>{
289-
self.imp.to_def(t).map(TraitAlias::from)
289+
self.imp.to_def(t)
290290
}
291291

292292
pubfnto_trait_def(&self,t:&ast::Trait) -> Option<Trait>{
293-
self.imp.to_def(t).map(Trait::from)
293+
self.imp.to_def(t)
294294
}
295295

296296
pubfnto_type_alias_def(&self,t:&ast::TypeAlias) -> Option<TypeAlias>{
297-
self.imp.to_def(t).map(TypeAlias::from)
297+
self.imp.to_def(t)
298298
}
299299

300300
pubfnto_union_def(&self,u:&ast::Union) -> Option<Union>{
301-
self.imp.to_def(u).map(Union::from)
301+
self.imp.to_def(u)
302302
}
303303
}
304304

0 commit comments

Comments
 (0)