diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-08-06 20:49:52 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-08-13 11:30:15 -0700 |
| commit | 76d46af6d405ac29d2d508705eacdcffad63e4c1 (patch) | |
| tree | 4240dae68a3a3837d36924bd0ca8014a75daab1f /src/libcore | |
| parent | 12e851208ddd40ca3e1b56badf5eaa32986f55a8 (diff) | |
| download | rust-76d46af6d405ac29d2d508705eacdcffad63e4c1.tar.gz rust-76d46af6d405ac29d2d508705eacdcffad63e4c1.zip | |
core: Rename ImmutableEqSlice to ImmutablePartialEqSlice
This is in the prelude and won't break much code. [breaking-change]
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/prelude.rs | 2 | ||||
| -rw-r--r-- | src/libcore/slice.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/prelude.rs b/src/libcore/prelude.rs index 2d5c9c0e960..ead48092c4d 100644 --- a/src/libcore/prelude.rs +++ b/src/libcore/prelude.rs @@ -61,6 +61,6 @@ pub use str::{Str, StrSlice}; pub use tuple::{Tuple1, Tuple2, Tuple3, Tuple4}; pub use tuple::{Tuple5, Tuple6, Tuple7, Tuple8}; pub use tuple::{Tuple9, Tuple10, Tuple11, Tuple12}; -pub use slice::{ImmutableEqSlice, ImmutableOrdSlice}; +pub use slice::{ImmutablePartialEqSlice, ImmutableOrdSlice}; pub use slice::{MutableSlice}; pub use slice::{Slice, ImmutableSlice}; diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index b914a26d94c..e0088c4761b 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -773,7 +773,7 @@ impl<'a,T> MutableSlice<'a, T> for &'a mut [T] { } /// Extension methods for vectors contain `PartialEq` elements. -pub trait ImmutableEqSlice<T:PartialEq> { +pub trait ImmutablePartialEqSlice<T:PartialEq> { /// Find the first index containing a matching value fn position_elem(&self, t: &T) -> Option<uint>; @@ -790,7 +790,7 @@ pub trait ImmutableEqSlice<T:PartialEq> { fn ends_with(&self, needle: &[T]) -> bool; } -impl<'a,T:PartialEq> ImmutableEqSlice<T> for &'a [T] { +impl<'a,T:PartialEq> ImmutablePartialEqSlice<T> for &'a [T] { #[inline] fn position_elem(&self, x: &T) -> Option<uint> { self.iter().position(|y| *x == *y) |
