Skip to content

Commit afad38b

Browse files
committed
---
yaml --- r: 126926 b: refs/heads/snap-stage3 c: 39135ec h: refs/heads/master v: v3
1 parent 3407a48 commit afad38b

File tree

40 files changed

+491
-1596
lines changed

40 files changed

+491
-1596
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 7be8f0af0393dcdb077c2f6b1653836fd3fba235
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6635fe7db4336ef31d2b372e7bfcce01d21853e0
4+
refs/heads/snap-stage3: 39135ecb18a6c7ef4dbb6e9838e1eda7407ccd2f
55
refs/heads/try: 502e4c045236682e9728539dc0d2b3d0b237f55c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcollections/bitv.rs

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ use core::cmp;
6767
use core::default::Default;
6868
use core::fmt;
6969
use core::iter::Take;
70-
use core::iter;
7170
use core::ops::Index;
7271
use core::slice;
7372
use core::uint;
@@ -831,20 +830,6 @@ impl Clone for Bitv {
831830
}
832831
}
833832

834-
impl PartialOrd for Bitv {
835-
#[inline]
836-
fn partial_cmp(&self, other: &Bitv) -> Option<Ordering> {
837-
iter::order::partial_cmp(self.iter(), other.iter())
838-
}
839-
}
840-
841-
impl Ord for Bitv {
842-
#[inline]
843-
fn cmp(&self, other: &Bitv) -> Ordering {
844-
iter::order::cmp(self.iter(), other.iter())
845-
}
846-
}
847-
848833
impl fmt::Show for Bitv {
849834
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
850835
for bit in self.iter() {
@@ -970,7 +955,7 @@ impl<'a> RandomAccessIterator<bool> for Bits<'a> {
970955
/// assert!(bv.eq_vec([true, true, false, true,
971956
/// false, false, false, false]));
972957
/// ```
973-
#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)]
958+
#[deriving(Clone, PartialEq, Eq)]
974959
pub struct BitvSet(Bitv);
975960

976961
impl Default for BitvSet {
@@ -2204,37 +2189,6 @@ mod tests {
22042189
assert_eq!(a.capacity(), uint::BITS);
22052190
}
22062191

2207-
#[test]
2208-
fn test_bitv_lt() {
2209-
let mut a = Bitv::with_capacity(5u, false);
2210-
let mut b = Bitv::with_capacity(5u, false);
2211-
2212-
assert!(!(a < b) && !(b < a));
2213-
b.set(2, true);
2214-
assert!(a < b);
2215-
a.set(3, true);
2216-
assert!(a < b);
2217-
a.set(2, true);
2218-
assert!(!(a < b) && b < a);
2219-
b.set(0, true);
2220-
assert!(a < b);
2221-
}
2222-
2223-
#[test]
2224-
fn test_ord() {
2225-
let mut a = Bitv::with_capacity(5u, false);
2226-
let mut b = Bitv::with_capacity(5u, false);
2227-
2228-
assert!(a <= b && a >= b);
2229-
a.set(1, true);
2230-
assert!(a > b && a >= b);
2231-
assert!(b < a && b <= a);
2232-
b.set(1, true);
2233-
b.set(2, true);
2234-
assert!(b > a && b >= a);
2235-
assert!(a < b && a <= b);
2236-
}
2237-
22382192
#[test]
22392193
fn test_bitv_clone() {
22402194
let mut a = BitvSet::new();

branches/snap-stage3/src/libcollections/hash/mod.rs

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -155,36 +155,29 @@ macro_rules! impl_hash_tuple(
155155
}
156156
);
157157

158-
( $($name:ident)+) => (
159-
impl<S: Writer, $($name: Hash<S>),*> Hash<S> for ($($name,)*) {
160-
#[allow(uppercase_variables)]
158+
($A:ident $($B:ident)*) => (
159+
impl<
160+
S: Writer,
161+
$A: Hash<S> $(, $B: Hash<S>)*
162+
> Hash<S> for ($A, $($B),*) {
161163
#[inline]
162164
fn hash(&self, state: &mut S) {
163165
match *self {
164-
($(ref $name,)*) => {
166+
(ref $A, $(ref $B),*) => {
167+
$A.hash(state);
165168
$(
166-
$name.hash(state);
169+
$B.hash(state);
167170
)*
168171
}
169172
}
170173
}
171174
}
175+
176+
impl_hash_tuple!($($B)*)
172177
);
173178
)
174179

175-
impl_hash_tuple!()
176-
impl_hash_tuple!(A)
177-
impl_hash_tuple!(A B)
178-
impl_hash_tuple!(A B C)
179-
impl_hash_tuple!(A B C D)
180-
impl_hash_tuple!(A B C D E)
181-
impl_hash_tuple!(A B C D E F)
182-
impl_hash_tuple!(A B C D E F G)
183-
impl_hash_tuple!(A B C D E F G H)
184-
impl_hash_tuple!(A B C D E F G H I)
185-
impl_hash_tuple!(A B C D E F G H I J)
186-
impl_hash_tuple!(A B C D E F G H I J K)
187-
impl_hash_tuple!(A B C D E F G H I J K L)
180+
impl_hash_tuple!(a0 a1 a2 a3 a4 a5 a6 a7)
188181

189182
impl<'a, S: Writer, T: Hash<S>> Hash<S> for &'a [T] {
190183
#[inline]

branches/snap-stage3/src/libcollections/smallintmap.rs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -373,20 +373,6 @@ impl<V:Clone> SmallIntMap<V> {
373373
}
374374
}
375375

376-
impl<V: PartialOrd> PartialOrd for SmallIntMap<V> {
377-
#[inline]
378-
fn partial_cmp(&self, other: &SmallIntMap<V>) -> Option<Ordering> {
379-
iter::order::partial_cmp(self.iter(), other.iter())
380-
}
381-
}
382-
383-
impl<V: Ord> Ord for SmallIntMap<V> {
384-
#[inline]
385-
fn cmp(&self, other: &SmallIntMap<V>) -> Ordering {
386-
iter::order::cmp(self.iter(), other.iter())
387-
}
388-
}
389-
390376
impl<V: fmt::Show> fmt::Show for SmallIntMap<V> {
391377
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
392378
try!(write!(f, "{{"));
@@ -784,38 +770,6 @@ mod test_map {
784770
assert!(a == b);
785771
}
786772

787-
#[test]
788-
fn test_lt() {
789-
let mut a = SmallIntMap::new();
790-
let mut b = SmallIntMap::new();
791-
792-
assert!(!(a < b) && !(b < a));
793-
assert!(b.insert(2u, 5i));
794-
assert!(a < b);
795-
assert!(a.insert(2, 7));
796-
assert!(!(a < b) && b < a);
797-
assert!(b.insert(1, 0));
798-
assert!(b < a);
799-
assert!(a.insert(0, 6));
800-
assert!(a < b);
801-
assert!(a.insert(6, 2));
802-
assert!(a < b && !(b < a));
803-
}
804-
805-
#[test]
806-
fn test_ord() {
807-
let mut a = SmallIntMap::new();
808-
let mut b = SmallIntMap::new();
809-
810-
assert!(a <= b && a >= b);
811-
assert!(a.insert(1u, 1i));
812-
assert!(a > b && a >= b);
813-
assert!(b < a && b <= a);
814-
assert!(b.insert(2, 2));
815-
assert!(b > a && b >= a);
816-
assert!(a < b && a <= b);
817-
}
818-
819773
#[test]
820774
fn test_hash() {
821775
let mut x = SmallIntMap::new();

0 commit comments

Comments
 (0)