Stop using the deprecated range function.

This commit is contained in:
Ms2ger 2015-04-22 19:51:17 +02:00
parent c4b7979450
commit 4d41f1c991
17 changed files with 27 additions and 28 deletions

View file

@ -339,7 +339,7 @@ impl<T: Send + 'static> Drop for Deque<T> {
let a = self.array.load(SeqCst);
// Free whatever is leftover in the dequeue, and then move the buffer
// back into the pool.
for i in range(t, b) {
for i in t..b {
let _: T = unsafe { (*a).get(i) };
}
self.pool.free(unsafe { transmute(a) });
@ -392,7 +392,7 @@ impl<T: Send> Buffer<T> {
// casting delta to usize and then adding gives the desired
// effect.
let buf = Buffer::new(self.log_size.wrapping_add(delta as usize));
for i in range(t, b) {
for i in t..b {
buf.put(i, self.get(i));
}
return buf;