diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-02-03 00:46:48 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-02-05 17:23:54 +0100 |
| commit | c92b161df0a42b613e2d8975b8aa1dd49497aaec (patch) | |
| tree | 4e8c4f21a6fb3205361f3c6ee2050404941ca26a | |
| parent | 3c8e13aff1ea5e57c0d843a4e76b533318ca68c5 (diff) | |
| download | rust-c92b161df0a42b613e2d8975b8aa1dd49497aaec.tar.gz rust-c92b161df0a42b613e2d8975b8aa1dd49497aaec.zip | |
Remove unneeded From trait impl for DefKind
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/clean/types.rs | 6 |
2 files changed, 1 insertions, 7 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 0815d779708..331bb2a73f9 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1042,7 +1042,7 @@ impl Clean<PolyTrait> for hir::PolyTraitRef<'_> { impl Clean<TypeKind> 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 510eaa05406..754f1c2eeeb 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<hir::def::DefKind> for TypeKind { fn from(other: hir::def::DefKind) -> Self { match other { |
