]> git.lizzy.rs Git - rust.git/commitdiff
Remove unused name_str_pair method
authorSteven Fackler <sfackler@gmail.com>
Sun, 8 Jun 2014 07:21:35 +0000 (00:21 -0700)
committerSteven Fackler <sfackler@gmail.com>
Sun, 8 Jun 2014 07:21:35 +0000 (00:21 -0700)
src/librustdoc/clean/mod.rs
src/libsyntax/attr.rs

index 3cb5c663c4ea5a4d64db78b9c57b2b639baf7fb1..650cd749af69e1e8d949f0bc2139887f3d3036f1 100644 (file)
@@ -429,17 +429,11 @@ fn value_str(&self) -> Option<InternedString> {
         }
     }
     fn meta_item_list<'a>(&'a self) -> Option<&'a [@ast::MetaItem]> { None }
-    fn name_str_pair(&self) -> Option<(InternedString, InternedString)> {
-        None
-    }
 }
 impl<'a> attr::AttrMetaMethods for &'a Attribute {
     fn name(&self) -> InternedString { (**self).name() }
     fn value_str(&self) -> Option<InternedString> { (**self).value_str() }
     fn meta_item_list<'a>(&'a self) -> Option<&'a [@ast::MetaItem]> { None }
-    fn name_str_pair(&self) -> Option<(InternedString, InternedString)> {
-        None
-    }
 }
 
 #[deriving(Clone, Encodable, Decodable)]
index a8f30c0514b80a2e193531d203700133c7460023..6005513af110df18e5a1f495552207176854cea8 100644 (file)
@@ -53,12 +53,6 @@ fn check_name(&self, name: &str) -> bool {
     fn value_str(&self) -> Option<InternedString>;
     /// Gets a list of inner meta items from a list MetaItem type.
     fn meta_item_list<'a>(&'a self) -> Option<&'a [@MetaItem]>;
-
-    /**
-     * If the meta item is a name-value type with a string value then returns
-     * a tuple containing the name and string value, otherwise `None`
-     */
-    fn name_str_pair(&self) -> Option<(InternedString,InternedString)>;
 }
 
 impl AttrMetaMethods for Attribute {
@@ -76,9 +70,6 @@ fn value_str(&self) -> Option<InternedString> {
     fn meta_item_list<'a>(&'a self) -> Option<&'a [@MetaItem]> {
         self.node.value.meta_item_list()
     }
-    fn name_str_pair(&self) -> Option<(InternedString,InternedString)> {
-        self.meta().name_str_pair()
-    }
 }
 
 impl AttrMetaMethods for MetaItem {
@@ -108,10 +99,6 @@ fn meta_item_list<'a>(&'a self) -> Option<&'a [@MetaItem]> {
             _ => None
         }
     }
-
-    fn name_str_pair(&self) -> Option<(InternedString,InternedString)> {
-        self.value_str().map(|s| (self.name(), s))
-    }
 }
 
 // Annoying, but required to get test_cfg to work
@@ -121,9 +108,6 @@ fn value_str(&self) -> Option<InternedString> { (**self).value_str() }
     fn meta_item_list<'a>(&'a self) -> Option<&'a [@MetaItem]> {
         (**self).meta_item_list()
     }
-    fn name_str_pair(&self) -> Option<(InternedString,InternedString)> {
-        (**self).name_str_pair()
-    }
 }