diff options
| author | Michael Darakananda <pongad@gmail.com> | 2014-02-06 02:34:33 -0500 |
|---|---|---|
| committer | Michael Darakananda <pongad@gmail.com> | 2014-02-13 20:12:59 -0500 |
| commit | bf1464c413bb2564c7be0eaceef9515bc0f94f1f (patch) | |
| tree | b956233c5e7c587d1faecbadb307117cda24952a /src/libcollections | |
| parent | 94d453e459107ed1c5d76f693686b29d31cdc58c (diff) | |
| download | rust-bf1464c413bb2564c7be0eaceef9515bc0f94f1f.tar.gz rust-bf1464c413bb2564c7be0eaceef9515bc0f94f1f.zip | |
Removed num::Orderable
Diffstat (limited to 'src/libcollections')
| -rw-r--r-- | src/libcollections/bitv.rs | 5 | ||||
| -rw-r--r-- | src/libcollections/ringbuf.rs | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/libcollections/bitv.rs b/src/libcollections/bitv.rs index 7211907f483..1ff868dced2 100644 --- a/src/libcollections/bitv.rs +++ b/src/libcollections/bitv.rs @@ -14,7 +14,6 @@ use std::cmp; use std::iter::RandomAccessIterator; use std::iter::{Rev, Enumerate, Repeat, Map, Zip}; -use std::num; use std::ops; use std::uint; use std::vec; @@ -846,7 +845,7 @@ impl MutableSet<uint> for BitvSet { } let nbits = self.capacity(); if value >= nbits { - let newsize = num::max(value, nbits * 2) / uint::BITS + 1; + let newsize = cmp::max(value, nbits * 2) / uint::BITS + 1; assert!(newsize > self.bitv.storage.len()); self.bitv.storage.grow(newsize, &0); } @@ -881,7 +880,7 @@ impl BitvSet { fn commons<'a>(&'a self, other: &'a BitvSet) -> Map<'static, ((uint, &'a uint), &'a ~[uint]), (uint, uint, uint), Zip<Enumerate<vec::Items<'a, uint>>, Repeat<&'a ~[uint]>>> { - let min = num::min(self.bitv.storage.len(), other.bitv.storage.len()); + let min = cmp::min(self.bitv.storage.len(), other.bitv.storage.len()); self.bitv.storage.slice(0, min).iter().enumerate() .zip(Repeat::new(&other.bitv.storage)) .map(|((i, &w), o_store)| (i * uint::BITS, w, o_store[i])) diff --git a/src/libcollections/ringbuf.rs b/src/libcollections/ringbuf.rs index 933fe2048e4..325f55b4634 100644 --- a/src/libcollections/ringbuf.rs +++ b/src/libcollections/ringbuf.rs @@ -13,7 +13,7 @@ //! RingBuf implements the trait Deque. It should be imported with `use //! extra::container::Deque`. -use std::num; +use std::cmp; use std::vec; use std::iter::{Rev, RandomAccessIterator}; @@ -120,7 +120,7 @@ impl<T> RingBuf<T> { /// Create an empty RingBuf with space for at least `n` elements. pub fn with_capacity(n: uint) -> RingBuf<T> { RingBuf{nelts: 0, lo: 0, - elts: vec::from_fn(num::max(MINIMUM_CAPACITY, n), |_| None)} + elts: vec::from_fn(cmp::max(MINIMUM_CAPACITY, n), |_| None)} } /// Retrieve an element in the RingBuf by index |
