From c92b161df0a42b613e2d8975b8aa1dd49497aaec Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 3 Feb 2021 00:46:48 +0100 Subject: [PATCH] Remove unneeded From trait impl for DefKind --- src/librustdoc/clean/mod.rs | 2 +- src/librustdoc/clean/types.rs | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 0815d7797087..331bb2a73f96 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1042,7 +1042,7 @@ impl Clean for hir::PolyTraitRef<'_> { impl Clean for hir::def::DefKind { fn clean(&self, _: &DocContext<'_>) -> TypeKind { - self.into() + (*self).into() } } diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 510eaa054063..754f1c2eeeb2 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -1302,12 +1302,6 @@ crate enum TypeKind { Primitive, } -impl<'a> From<&'a hir::def::DefKind> for TypeKind { - fn from(other: &hir::def::DefKind) -> Self { - Self::from(*other) - } -} - impl From for TypeKind { fn from(other: hir::def::DefKind) -> Self { match other {