@@ -410,12 +410,12 @@ pub enum Attribute {
410410impl Clean < Attribute > for ast:: MetaItem {
411411 fn clean ( & self , cx : & DocContext ) -> Attribute {
412412 match self . node {
413- ast:: MetaWord ( ref s) => Word ( s. get ( ) . to_string ( ) ) ,
413+ ast:: MetaWord ( ref s) => Word ( s. to_string ( ) ) ,
414414 ast:: MetaList ( ref s, ref l) => {
415- List ( s. get ( ) . to_string ( ) , l. clean ( cx) )
415+ List ( s. to_string ( ) , l. clean ( cx) )
416416 }
417417 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) )
419419 }
420420 }
421421 }
@@ -700,19 +700,19 @@ impl Lifetime {
700700
701701impl Clean < Lifetime > for ast:: Lifetime {
702702 fn clean ( & self , _: & DocContext ) -> Lifetime {
703- Lifetime ( token:: get_name ( self . name ) . get ( ) . to_string ( ) )
703+ Lifetime ( token:: get_name ( self . name ) . to_string ( ) )
704704 }
705705}
706706
707707impl Clean < Lifetime > for ast:: LifetimeDef {
708708 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 ( ) )
710710 }
711711}
712712
713713impl Clean < Lifetime > for ty:: RegionParameterDef {
714714 fn clean ( & self , _: & DocContext ) -> Lifetime {
715- Lifetime ( token:: get_name ( self . name ) . get ( ) . to_string ( ) )
715+ Lifetime ( token:: get_name ( self . name ) . to_string ( ) )
716716 }
717717}
718718
@@ -721,7 +721,7 @@ impl Clean<Option<Lifetime>> for ty::Region {
721721 match * self {
722722 ty:: ReStatic => Some ( Lifetime :: statik ( ) ) ,
723723 ty:: ReLateBound ( _, ty:: BrNamed ( _, name) ) =>
724- Some ( Lifetime ( token:: get_name ( name) . get ( ) . to_string ( ) ) ) ,
724+ Some ( Lifetime ( token:: get_name ( name) . to_string ( ) ) ) ,
725725 ty:: ReEarlyBound ( _, _, _, name) => Some ( Lifetime ( name. clean ( cx) ) ) ,
726726
727727 ty:: ReLateBound ( ..) |
@@ -1953,20 +1953,20 @@ fn path_to_string(p: &ast::Path) -> String {
19531953 } else {
19541954 first = false ;
19551955 }
1956- s. push_str ( i . get ( ) ) ;
1956+ s. push_str ( & i ) ;
19571957 }
19581958 s
19591959}
19601960
19611961impl Clean < String > for ast:: Ident {
19621962 fn clean ( & self , _: & DocContext ) -> String {
1963- token:: get_ident ( * self ) . get ( ) . to_string ( )
1963+ token:: get_ident ( * self ) . to_string ( )
19641964 }
19651965}
19661966
19671967impl Clean < String > for ast:: Name {
19681968 fn clean ( & self , _: & DocContext ) -> String {
1969- token:: get_name ( * self ) . get ( ) . to_string ( )
1969+ token:: get_name ( * self ) . to_string ( )
19701970 }
19711971}
19721972
@@ -2158,7 +2158,7 @@ impl Clean<Vec<Item>> for doctree::Import {
21582158 // forcefully don't inline if this is not public or if the
21592159 // #[doc(no_inline)] attribute is present.
21602160 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 ( ) {
21622162 Some ( l) => attr:: contains_name ( l, "no_inline" ) ,
21632163 None => false ,
21642164 }
@@ -2311,7 +2311,7 @@ impl ToSource for syntax::codemap::Span {
23112311
23122312fn lit_to_string ( lit : & ast:: Lit ) -> String {
23132313 match lit. node {
2314- ast:: LitStr ( ref st, _) => st. get ( ) . to_string ( ) ,
2314+ ast:: LitStr ( ref st, _) => st. to_string ( ) ,
23152315 ast:: LitBinary ( ref data) => format ! ( "{:?}" , data) ,
23162316 ast:: LitByte ( b) => {
23172317 let mut res = String :: from_str ( "b'" ) ;
@@ -2323,8 +2323,8 @@ fn lit_to_string(lit: &ast::Lit) -> String {
23232323 } ,
23242324 ast:: LitChar ( c) => format ! ( "'{}'" , c) ,
23252325 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 ( ) ,
23282328 ast:: LitBool ( b) => b. to_string ( ) ,
23292329 }
23302330}
@@ -2336,7 +2336,7 @@ fn name_from_pat(p: &ast::Pat) -> String {
23362336 match p. node {
23372337 PatWild ( PatWildSingle ) => "_" . to_string ( ) ,
23382338 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 ( ) ,
23402340 PatEnum ( ref p, _) => path_to_string ( p) ,
23412341 PatStruct ( ref name, ref fields, etc) => {
23422342 format ! ( "{} {{ {}{} }}" , path_to_string( name) ,
@@ -2486,11 +2486,11 @@ impl Clean<Stability> for attr::Stability {
24862486 fn clean ( & self , _: & DocContext ) -> Stability {
24872487 Stability {
24882488 level : self . level ,
2489- feature : self . feature . get ( ) . to_string ( ) ,
2489+ feature : self . feature . to_string ( ) ,
24902490 since : self . since . as_ref ( ) . map_or ( "" . to_string ( ) ,
2491- |interned| interned. get ( ) . to_string ( ) ) ,
2491+ |interned| interned. to_string ( ) ) ,
24922492 reason : self . reason . as_ref ( ) . map_or ( "" . to_string ( ) ,
2493- |interned| interned. get ( ) . to_string ( ) ) ,
2493+ |interned| interned. to_string ( ) ) ,
24942494 }
24952495 }
24962496}
0 commit comments