diff options
| -rw-r--r-- | src/libcore/str/mod.rs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 0af9fcf0a3d..670c2afa66f 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -1406,16 +1406,6 @@ impl<'a> DoubleEndedIterator for LinesAny<'a> { impl<'a> FusedIterator for LinesAny<'a> {} /* -Section: Comparing strings -*/ - -/// Bytewise slice equality -#[inline] -fn eq_slice(a: &str, b: &str) -> bool { - a.as_bytes() == b.as_bytes() -} - -/* Section: UTF-8 validation */ @@ -1590,7 +1580,6 @@ mod traits { use cmp::Ordering; use ops; use slice::{self, SliceIndex}; - use str::eq_slice; /// Implements ordering of strings. /// @@ -1611,7 +1600,7 @@ mod traits { impl PartialEq for str { #[inline] fn eq(&self, other: &str) -> bool { - eq_slice(self, other) + self.as_bytes() == other.as_bytes() } #[inline] fn ne(&self, other: &str) -> bool { !(*self).eq(other) } |
