]> git.lizzy.rs Git - rust.git/commitdiff
remove unnecessary function
authorAgustin Chiappe Berrini <jnieve@gmail.com>
Thu, 7 Dec 2017 08:56:31 +0000 (03:56 -0500)
committerAgustin Chiappe Berrini <jnieve@gmail.com>
Thu, 7 Dec 2017 08:56:31 +0000 (03:56 -0500)
src/libsyntax_pos/symbol.rs

index 0e90e0922b977a8cebb68450d2a5b579ae442cd4..6a67e4fcd5d2b9bd1ce1117bfa410ddae01ad9df 100644 (file)
@@ -36,7 +36,7 @@ pub fn from_str(string: &str) -> Ident {
     }
 
     pub fn without_first_quote(&self) -> Ident {
-        Ident { name: self.name.without_first_quote(), ctxt: self.ctxt }
+        Ident { name: Symbol::from(self.name.as_str().trim_left_matches('\'')), ctxt: self.ctxt }
     }
 
     pub fn modern(self) -> Ident {
@@ -117,10 +117,6 @@ pub fn as_str(self) -> InternedString {
     pub fn as_u32(self) -> u32 {
         self.0
     }
-
-    pub fn without_first_quote(&self) -> Symbol {
-        Symbol::from(self.as_str().trim_left_matches('\''))
-    }
 }
 
 impl<'a> From<&'a str> for Symbol {