about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcore/str/pattern.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/libcore/str/pattern.rs b/src/libcore/str/pattern.rs
index edb7bed4520..3200cfc4982 100644
--- a/src/libcore/str/pattern.rs
+++ b/src/libcore/str/pattern.rs
@@ -241,23 +241,16 @@ pub trait DoubleEndedSearcher<'a>: ReverseSearcher<'a> {}
 #[doc(hidden)]
 trait CharEq {
     fn matches(&mut self, c: char) -> bool;
-    fn only_ascii(&self) -> bool;
 }
 
 impl CharEq for char {
     #[inline]
     fn matches(&mut self, c: char) -> bool { *self == c }
-
-    #[inline]
-    fn only_ascii(&self) -> bool { (*self as u32) < 128 }
 }
 
 impl<F> CharEq for F where F: FnMut(char) -> bool {
     #[inline]
     fn matches(&mut self, c: char) -> bool { (*self)(c) }
-
-    #[inline]
-    fn only_ascii(&self) -> bool { false }
 }
 
 impl<'a> CharEq for &'a [char] {
@@ -265,11 +258,6 @@ impl<'a> CharEq for &'a [char] {
     fn matches(&mut self, c: char) -> bool {
         self.iter().any(|&m| { let mut m = m; m.matches(c) })
     }
-
-    #[inline]
-    fn only_ascii(&self) -> bool {
-        self.iter().all(|m| m.only_ascii())
-    }
 }
 
 struct CharEqPattern<C: CharEq>(C);
@@ -279,8 +267,6 @@ struct CharEqSearcher<'a, C: CharEq> {
     char_eq: C,
     haystack: &'a str,
     char_indices: super::CharIndices<'a>,
-    #[allow(dead_code)]
-    ascii_only: bool,
 }
 
 impl<'a, C: CharEq> Pattern<'a> for CharEqPattern<C> {
@@ -289,7 +275,6 @@ impl<'a, C: CharEq> Pattern<'a> for CharEqPattern<C> {
     #[inline]
     fn into_searcher(self, haystack: &'a str) -> CharEqSearcher<'a, C> {
         CharEqSearcher {
-            ascii_only: self.0.only_ascii(),
             haystack,
             char_eq: self.0,
             char_indices: haystack.char_indices(),
@@ -499,7 +484,6 @@ impl<'a, F> fmt::Debug for CharPredicateSearcher<'a, F>
         f.debug_struct("CharPredicateSearcher")
             .field("haystack", &self.0.haystack)
             .field("char_indices", &self.0.char_indices)
-            .field("ascii_only", &self.0.ascii_only)
             .finish()
     }
 }