@@ -5,12 +5,14 @@ use std::{
5
5
rc:: Rc ,
6
6
} ;
7
7
8
- use crate :: vita_headers_db :: { missing_features_filter , stub_lib_name , VitaDb } ;
8
+ use quote :: ToTokens ;
9
9
use syn:: {
10
10
token, visit_mut:: VisitMut , AttrStyle , Attribute , ForeignItem , Ident , Item , ItemForeignMod ,
11
- MacroDelimiter , Meta , MetaList , Type ,
11
+ MacroDelimiter , Meta , MetaList ,
12
12
} ;
13
13
14
+ use crate :: vita_headers_db:: { missing_features_filter, stub_lib_name, VitaDb } ;
15
+
14
16
type FeatureSet = BTreeSet < Rc < str > > ;
15
17
16
18
const DEFINED_ELSEWHERE_FUNCTIONS : [ ( & str , & str ) ; 3 ] = [
@@ -215,24 +217,7 @@ impl VisitMut for Sort {
215
217
Item :: Enum ( i) => ( 4 , i. ident . to_string ( ) ) ,
216
218
Item :: Union ( i) => ( 4 , i. ident . to_string ( ) ) ,
217
219
Item :: Impl ( i) => {
218
- let ident =
219
- match & * i. self_ty {
220
- Type :: Path ( path_type) => path_type. path . segments . iter ( ) . fold (
221
- String :: new ( ) ,
222
- |acc, segment| {
223
- let ident_string = segment. ident . to_string ( ) ;
224
- if acc. is_empty ( ) {
225
- ident_string
226
- } else {
227
- acc + "::" + & ident_string
228
- }
229
- } ,
230
- ) ,
231
- ty => {
232
- log:: warn!( "impl on unexpected type {ty:?}" ) ;
233
- String :: new ( )
234
- }
235
- } ;
220
+ let ident = i. self_ty . clone ( ) . into_token_stream ( ) . to_string ( ) ;
236
221
( 4 , ident)
237
222
}
238
223
Item :: Const ( i) => ( 5 , i. ident . to_string ( ) ) ,
0 commit comments