Skip to content

Commit c92b161

Browse files
Remove unneeded From trait impl for DefKind
1 parent 3c8e13a commit c92b161

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/librustdoc/clean/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ impl Clean<PolyTrait> for hir::PolyTraitRef<'_> {
10421042

10431043
impl Clean<TypeKind> for hir::def::DefKind {
10441044
fn clean(&self, _: &DocContext<'_>) -> TypeKind {
1045-
self.into()
1045+
(*self).into()
10461046
}
10471047
}
10481048

src/librustdoc/clean/types.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1302,12 +1302,6 @@ crate enum TypeKind {
13021302
Primitive,
13031303
}
13041304

1305-
impl<'a> From<&'a hir::def::DefKind> for TypeKind {
1306-
fn from(other: &hir::def::DefKind) -> Self {
1307-
Self::from(*other)
1308-
}
1309-
}
1310-
13111305
impl From<hir::def::DefKind> for TypeKind {
13121306
fn from(other: hir::def::DefKind) -> Self {
13131307
match other {

0 commit comments

Comments
 (0)