File tree 1 file changed +7
-7
lines changed 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2025,7 +2025,7 @@ impl Clean<Item> for doctree::Variant {
2025
2025
deprecation : self . depr . clean ( cx) ,
2026
2026
def_id : cx. map . local_def_id ( self . def . id ( ) ) ,
2027
2027
inner : VariantItem ( Variant {
2028
- kind : VariantKind :: from_struct_def ( & self . def , cx) ,
2028
+ kind : self . def . clean ( cx) ,
2029
2029
} ) ,
2030
2030
}
2031
2031
}
@@ -2079,14 +2079,14 @@ pub enum VariantKind {
2079
2079
StructVariant ( VariantStruct ) ,
2080
2080
}
2081
2081
2082
- impl VariantKind {
2083
- fn from_struct_def ( struct_def : & hir :: VariantData , cx : & DocContext ) -> VariantKind {
2084
- if struct_def . is_struct ( ) {
2085
- StructVariant ( struct_def . clean ( cx) )
2086
- } else if struct_def . is_unit ( ) {
2082
+ impl Clean < VariantKind > for hir :: VariantData {
2083
+ fn clean ( & self , cx : & DocContext ) -> VariantKind {
2084
+ if self . is_struct ( ) {
2085
+ StructVariant ( self . clean ( cx) )
2086
+ } else if self . is_unit ( ) {
2087
2087
CLikeVariant
2088
2088
} else {
2089
- TupleVariant ( struct_def . fields ( ) . iter ( ) . map ( |x| x. ty . clean ( cx) ) . collect ( ) )
2089
+ TupleVariant ( self . fields ( ) . iter ( ) . map ( |x| x. ty . clean ( cx) ) . collect ( ) )
2090
2090
}
2091
2091
}
2092
2092
}
You can’t perform that action at this time.
0 commit comments