Skip to content

Commit 360bb47

Browse files
committed
---
yaml --- r: 152992 b: refs/heads/try2 c: fa5bc6f h: refs/heads/master v: v3
1 parent 9a7d82a commit 360bb47

File tree

2 files changed

+40
-50
lines changed

2 files changed

+40
-50
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 16a9258797436498a00726e8aea2ee8a85755e15
8+
refs/heads/try2: fa5bc6f1bd703cb081b48d032713bf78499bf155
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libcore/slice.rs

Lines changed: 39 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
use mem::transmute;
3737
use clone::Clone;
3838
use collections::Collection;
39-
use cmp::{PartialEq, Ord, Ordering, Less, Equal, Greater};
39+
use cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering, Less, Equal, Greater, Equiv};
4040
use cmp;
4141
use default::Default;
4242
use iter::*;
@@ -1422,59 +1422,49 @@ pub mod bytes {
14221422
// Boilerplate traits
14231423
//
14241424

1425-
#[allow(missing_doc)]
1426-
pub mod traits {
1427-
use super::*;
1428-
1429-
use cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering, Equiv};
1430-
use iter::order;
1431-
use collections::Collection;
1432-
use option::Option;
1433-
1434-
impl<'a,T:PartialEq> PartialEq for &'a [T] {
1435-
fn eq(&self, other: & &'a [T]) -> bool {
1436-
self.len() == other.len() &&
1437-
order::eq(self.iter(), other.iter())
1438-
}
1439-
fn ne(&self, other: & &'a [T]) -> bool {
1440-
self.len() != other.len() ||
1441-
order::ne(self.iter(), other.iter())
1442-
}
1425+
impl<'a,T:PartialEq> PartialEq for &'a [T] {
1426+
fn eq(&self, other: & &'a [T]) -> bool {
1427+
self.len() == other.len() &&
1428+
order::eq(self.iter(), other.iter())
1429+
}
1430+
fn ne(&self, other: & &'a [T]) -> bool {
1431+
self.len() != other.len() ||
1432+
order::ne(self.iter(), other.iter())
14431433
}
1434+
}
14441435

1445-
impl<'a,T:Eq> Eq for &'a [T] {}
1436+
impl<'a,T:Eq> Eq for &'a [T] {}
14461437

1447-
impl<'a,T:PartialEq, V: Vector<T>> Equiv<V> for &'a [T] {
1448-
#[inline]
1449-
fn equiv(&self, other: &V) -> bool { self.as_slice() == other.as_slice() }
1450-
}
1438+
impl<'a,T:PartialEq, V: Vector<T>> Equiv<V> for &'a [T] {
1439+
#[inline]
1440+
fn equiv(&self, other: &V) -> bool { self.as_slice() == other.as_slice() }
1441+
}
14511442

1452-
impl<'a,T:Ord> Ord for &'a [T] {
1453-
fn cmp(&self, other: & &'a [T]) -> Ordering {
1454-
order::cmp(self.iter(), other.iter())
1455-
}
1443+
impl<'a,T:Ord> Ord for &'a [T] {
1444+
fn cmp(&self, other: & &'a [T]) -> Ordering {
1445+
order::cmp(self.iter(), other.iter())
14561446
}
1447+
}
14571448

1458-
impl<'a, T: PartialOrd> PartialOrd for &'a [T] {
1459-
#[inline]
1460-
fn partial_cmp(&self, other: &&'a [T]) -> Option<Ordering> {
1461-
order::partial_cmp(self.iter(), other.iter())
1462-
}
1463-
#[inline]
1464-
fn lt(&self, other: & &'a [T]) -> bool {
1465-
order::lt(self.iter(), other.iter())
1466-
}
1467-
#[inline]
1468-
fn le(&self, other: & &'a [T]) -> bool {
1469-
order::le(self.iter(), other.iter())
1470-
}
1471-
#[inline]
1472-
fn ge(&self, other: & &'a [T]) -> bool {
1473-
order::ge(self.iter(), other.iter())
1474-
}
1475-
#[inline]
1476-
fn gt(&self, other: & &'a [T]) -> bool {
1477-
order::gt(self.iter(), other.iter())
1478-
}
1449+
impl<'a, T: PartialOrd> PartialOrd for &'a [T] {
1450+
#[inline]
1451+
fn partial_cmp(&self, other: &&'a [T]) -> Option<Ordering> {
1452+
order::partial_cmp(self.iter(), other.iter())
1453+
}
1454+
#[inline]
1455+
fn lt(&self, other: & &'a [T]) -> bool {
1456+
order::lt(self.iter(), other.iter())
1457+
}
1458+
#[inline]
1459+
fn le(&self, other: & &'a [T]) -> bool {
1460+
order::le(self.iter(), other.iter())
1461+
}
1462+
#[inline]
1463+
fn ge(&self, other: & &'a [T]) -> bool {
1464+
order::ge(self.iter(), other.iter())
1465+
}
1466+
#[inline]
1467+
fn gt(&self, other: & &'a [T]) -> bool {
1468+
order::gt(self.iter(), other.iter())
14791469
}
14801470
}

0 commit comments

Comments
 (0)