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