@@ -411,12 +411,12 @@ pub enum Attribute {
411
411
impl Clean < Attribute > for ast:: MetaItem {
412
412
fn clean ( & self , cx : & DocContext ) -> Attribute {
413
413
match self . node {
414
- ast:: MetaWord ( ref s) => Word ( s. get ( ) . to_string ( ) ) ,
414
+ ast:: MetaWord ( ref s) => Word ( s. to_string ( ) ) ,
415
415
ast:: MetaList ( ref s, ref l) => {
416
- List ( s. get ( ) . to_string ( ) , l. clean ( cx) )
416
+ List ( s. to_string ( ) , l. clean ( cx) )
417
417
}
418
418
ast:: MetaNameValue ( ref s, ref v) => {
419
- NameValue ( s. get ( ) . to_string ( ) , lit_to_string ( v) )
419
+ NameValue ( s. to_string ( ) , lit_to_string ( v) )
420
420
}
421
421
}
422
422
}
@@ -701,19 +701,19 @@ impl Lifetime {
701
701
702
702
impl Clean < Lifetime > for ast:: Lifetime {
703
703
fn clean ( & self , _: & DocContext ) -> Lifetime {
704
- Lifetime ( token:: get_name ( self . name ) . get ( ) . to_string ( ) )
704
+ Lifetime ( token:: get_name ( self . name ) . to_string ( ) )
705
705
}
706
706
}
707
707
708
708
impl Clean < Lifetime > for ast:: LifetimeDef {
709
709
fn clean ( & self , _: & DocContext ) -> Lifetime {
710
- Lifetime ( token:: get_name ( self . lifetime . name ) . get ( ) . to_string ( ) )
710
+ Lifetime ( token:: get_name ( self . lifetime . name ) . to_string ( ) )
711
711
}
712
712
}
713
713
714
714
impl Clean < Lifetime > for ty:: RegionParameterDef {
715
715
fn clean ( & self , _: & DocContext ) -> Lifetime {
716
- Lifetime ( token:: get_name ( self . name ) . get ( ) . to_string ( ) )
716
+ Lifetime ( token:: get_name ( self . name ) . to_string ( ) )
717
717
}
718
718
}
719
719
@@ -722,7 +722,7 @@ impl Clean<Option<Lifetime>> for ty::Region {
722
722
match * self {
723
723
ty:: ReStatic => Some ( Lifetime :: statik ( ) ) ,
724
724
ty:: ReLateBound ( _, ty:: BrNamed ( _, name) ) =>
725
- Some ( Lifetime ( token:: get_name ( name) . get ( ) . to_string ( ) ) ) ,
725
+ Some ( Lifetime ( token:: get_name ( name) . to_string ( ) ) ) ,
726
726
ty:: ReEarlyBound ( _, _, _, name) => Some ( Lifetime ( name. clean ( cx) ) ) ,
727
727
728
728
ty:: ReLateBound ( ..) |
@@ -1954,20 +1954,20 @@ fn path_to_string(p: &ast::Path) -> String {
1954
1954
} else {
1955
1955
first = false ;
1956
1956
}
1957
- s. push_str ( i . get ( ) ) ;
1957
+ s. push_str ( & i ) ;
1958
1958
}
1959
1959
s
1960
1960
}
1961
1961
1962
1962
impl Clean < String > for ast:: Ident {
1963
1963
fn clean ( & self , _: & DocContext ) -> String {
1964
- token:: get_ident ( * self ) . get ( ) . to_string ( )
1964
+ token:: get_ident ( * self ) . to_string ( )
1965
1965
}
1966
1966
}
1967
1967
1968
1968
impl Clean < String > for ast:: Name {
1969
1969
fn clean ( & self , _: & DocContext ) -> String {
1970
- token:: get_name ( * self ) . get ( ) . to_string ( )
1970
+ token:: get_name ( * self ) . to_string ( )
1971
1971
}
1972
1972
}
1973
1973
@@ -2159,7 +2159,7 @@ impl Clean<Vec<Item>> for doctree::Import {
2159
2159
// forcefully don't inline if this is not public or if the
2160
2160
// #[doc(no_inline)] attribute is present.
2161
2161
let denied = self . vis != ast:: Public || self . attrs . iter ( ) . any ( |a| {
2162
- a. name ( ) . get ( ) == "doc" && match a. meta_item_list ( ) {
2162
+ & a. name ( ) [ ] == "doc" && match a. meta_item_list ( ) {
2163
2163
Some ( l) => attr:: contains_name ( l, "no_inline" ) ,
2164
2164
None => false ,
2165
2165
}
@@ -2312,7 +2312,7 @@ impl ToSource for syntax::codemap::Span {
2312
2312
2313
2313
fn lit_to_string ( lit : & ast:: Lit ) -> String {
2314
2314
match lit. node {
2315
- ast:: LitStr ( ref st, _) => st. get ( ) . to_string ( ) ,
2315
+ ast:: LitStr ( ref st, _) => st. to_string ( ) ,
2316
2316
ast:: LitBinary ( ref data) => format ! ( "{:?}" , data) ,
2317
2317
ast:: LitByte ( b) => {
2318
2318
let mut res = String :: from_str ( "b'" ) ;
@@ -2324,8 +2324,8 @@ fn lit_to_string(lit: &ast::Lit) -> String {
2324
2324
} ,
2325
2325
ast:: LitChar ( c) => format ! ( "'{}'" , c) ,
2326
2326
ast:: LitInt ( i, _t) => i. to_string ( ) ,
2327
- ast:: LitFloat ( ref f, _t) => f. get ( ) . to_string ( ) ,
2328
- ast:: LitFloatUnsuffixed ( ref f) => f. get ( ) . to_string ( ) ,
2327
+ ast:: LitFloat ( ref f, _t) => f. to_string ( ) ,
2328
+ ast:: LitFloatUnsuffixed ( ref f) => f. to_string ( ) ,
2329
2329
ast:: LitBool ( b) => b. to_string ( ) ,
2330
2330
}
2331
2331
}
@@ -2337,7 +2337,7 @@ fn name_from_pat(p: &ast::Pat) -> String {
2337
2337
match p. node {
2338
2338
PatWild ( PatWildSingle ) => "_" . to_string ( ) ,
2339
2339
PatWild ( PatWildMulti ) => ".." . to_string ( ) ,
2340
- PatIdent ( _, ref p, _) => token:: get_ident ( p. node ) . get ( ) . to_string ( ) ,
2340
+ PatIdent ( _, ref p, _) => token:: get_ident ( p. node ) . to_string ( ) ,
2341
2341
PatEnum ( ref p, _) => path_to_string ( p) ,
2342
2342
PatStruct ( ref name, ref fields, etc) => {
2343
2343
format ! ( "{} {{ {}{} }}" , path_to_string( name) ,
@@ -2487,11 +2487,11 @@ impl Clean<Stability> for attr::Stability {
2487
2487
fn clean ( & self , _: & DocContext ) -> Stability {
2488
2488
Stability {
2489
2489
level : self . level ,
2490
- feature : self . feature . get ( ) . to_string ( ) ,
2490
+ feature : self . feature . to_string ( ) ,
2491
2491
since : self . since . as_ref ( ) . map_or ( "" . to_string ( ) ,
2492
- |interned| interned. get ( ) . to_string ( ) ) ,
2492
+ |interned| interned. to_string ( ) ) ,
2493
2493
reason : self . reason . as_ref ( ) . map_or ( "" . to_string ( ) ,
2494
- |interned| interned. get ( ) . to_string ( ) ) ,
2494
+ |interned| interned. to_string ( ) ) ,
2495
2495
}
2496
2496
}
2497
2497
}
0 commit comments