diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/arena.rs | 4 | ||||
| -rw-r--r-- | src/libstd/map.rs | 10 | ||||
| -rw-r--r-- | src/libstd/net_tcp.rs | 2 | ||||
| -rw-r--r-- | src/libstd/par.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rope.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sort.rs | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/src/libstd/arena.rs b/src/libstd/arena.rs index 162e5f2c071..7609fa70454 100644 --- a/src/libstd/arena.rs +++ b/src/libstd/arena.rs @@ -135,7 +135,7 @@ impl &Arena { fn alloc_pod_grow(n_bytes: uint, align: uint) -> *u8 { // Allocate a new chunk. let chunk_size = at_vec::capacity(self.pod_head.data); - let new_min_chunk_size = uint::max(&n_bytes, &chunk_size); + let new_min_chunk_size = uint::max(n_bytes, chunk_size); self.chunks = @cons(copy self.pod_head, self.chunks); self.pod_head = chunk(uint::next_power_of_two(new_min_chunk_size + 1u), true); @@ -177,7 +177,7 @@ impl &Arena { fn alloc_nonpod_grow(n_bytes: uint, align: uint) -> (*u8, *u8) { // Allocate a new chunk. let chunk_size = at_vec::capacity(self.head.data); - let new_min_chunk_size = uint::max(&n_bytes, &chunk_size); + let new_min_chunk_size = uint::max(n_bytes, chunk_size); self.chunks = @cons(copy self.head, self.chunks); self.head = chunk(uint::next_power_of_two(new_min_chunk_size + 1u), false); diff --git a/src/libstd/map.rs b/src/libstd/map.rs index 2a2e6b5efc6..f2dfb3200f3 100644 --- a/src/libstd/map.rs +++ b/src/libstd/map.rs @@ -426,12 +426,12 @@ fn bytes_hash<V: copy>() -> hashmap<~[u8], V> { /// Construct a hashmap for int keys fn int_hash<V: copy>() -> hashmap<int, V> { - return hashmap(int::hash, int::eq); + return hashmap(|x| { int::hash(*x) }, |x, y| { int::eq(*x, *y)}); } /// Construct a hashmap for uint keys fn uint_hash<V: copy>() -> hashmap<uint, V> { - return hashmap(uint::hash, uint::eq); + return hashmap(|x| { uint::hash(*x) }, |x, y| { uint::eq(*x, *y) } ); } /// Convenience function for adding keys to a hashmap with nil type keys @@ -473,15 +473,15 @@ fn hash_from_bytes<V: copy>(items: &[(~[u8], V)]) -> hashmap<~[u8], V> { /// Construct a hashmap from a vector with int keys fn hash_from_ints<V: copy>(items: &[(int, V)]) -> hashmap<int, V> { - hash_from_vec(int::hash, int::eq, items) + hash_from_vec(|x| { int::hash(*x) }, |x, y| { int::eq(*x, *y) }, items) } /// Construct a hashmap from a vector with uint keys fn hash_from_uints<V: copy>(items: &[(uint, V)]) -> hashmap<uint, V> { - hash_from_vec(uint::hash, uint::eq, items) + hash_from_vec(|x| { uint::hash(*x) }, |x, y| { uint::eq(*x, *y) } , items) } -// XXX Transitionary +// XXX Transitional impl<K: Eq IterBytes Hash copy, V: copy> Managed<LinearMap<K, V>>: map<K, V> { pure fn size() -> uint { diff --git a/src/libstd/net_tcp.rs b/src/libstd/net_tcp.rs index fa799ee3e31..255ce96e986 100644 --- a/src/libstd/net_tcp.rs +++ b/src/libstd/net_tcp.rs @@ -772,7 +772,7 @@ impl TcpSocketBuf: io::Reader { } } - let count = uint::min(&len, &self.data.buf.len()); + let count = uint::min(len, self.data.buf.len()); let mut data = ~[]; self.data.buf <-> data; diff --git a/src/libstd/par.rs b/src/libstd/par.rs index ab5062148e0..34ea2433bed 100644 --- a/src/libstd/par.rs +++ b/src/libstd/par.rs @@ -30,7 +30,7 @@ fn map_slices<A: copy send, B: copy send>( ~[f()(0u, xs)] } else { - let num_tasks = uint::min(&max_tasks, &(len / min_granularity)); + let num_tasks = uint::min(max_tasks, len / min_granularity); let items_per_task = len / num_tasks; @@ -38,7 +38,7 @@ fn map_slices<A: copy send, B: copy send>( let mut base = 0u; log(info, ~"spawning tasks"); while base < len { - let end = uint::min(&len, &(base + items_per_task)); + let end = uint::min(len, base + items_per_task); // FIXME: why is the ::<A, ()> annotation required here? (#2617) do vec::as_buf::<A, ()>(xs) |p, _len| { let f = f(); diff --git a/src/libstd/rope.rs b/src/libstd/rope.rs index 12676377def..23f33a79c53 100644 --- a/src/libstd/rope.rs +++ b/src/libstd/rope.rs @@ -1004,7 +1004,7 @@ mod node { right : right, char_len: char_len(left) + char_len(right), byte_len: byte_len(left) + byte_len(right), - height: uint::max(&height(left), &height(right)) + 1u + height: uint::max(height(left), height(right)) + 1u }) } diff --git a/src/libstd/sort.rs b/src/libstd/sort.rs index 52d25f53940..33e6feb8427 100644 --- a/src/libstd/sort.rs +++ b/src/libstd/sort.rs @@ -242,7 +242,7 @@ mod test_qsort { let expected = ~[1, 2, 3]; - sort::quick_sort(int::le, names); + sort::quick_sort(|x, y| { int::le(*x, *y) }, names); let immut_names = vec::from_mut(names); |
