make btree not use &A: Allocator instance
This commit is contained in:
parent
cdcc53b7dc
commit
7952205bc8
@ -1644,11 +1644,11 @@ impl<K, V, A: Allocator + Clone> IntoIter<K, V, A> {
|
||||
&mut self,
|
||||
) -> Option<Handle<NodeRef<marker::Dying, K, V, marker::LeafOrInternal>, marker::KV>> {
|
||||
if self.length == 0 {
|
||||
self.range.deallocating_end(&self.alloc);
|
||||
self.range.deallocating_end(self.alloc.clone());
|
||||
None
|
||||
} else {
|
||||
self.length -= 1;
|
||||
Some(unsafe { self.range.deallocating_next_unchecked(&self.alloc) })
|
||||
Some(unsafe { self.range.deallocating_next_unchecked(self.alloc.clone()) })
|
||||
}
|
||||
}
|
||||
|
||||
@ -1658,11 +1658,11 @@ impl<K, V, A: Allocator + Clone> IntoIter<K, V, A> {
|
||||
&mut self,
|
||||
) -> Option<Handle<NodeRef<marker::Dying, K, V, marker::LeafOrInternal>, marker::KV>> {
|
||||
if self.length == 0 {
|
||||
self.range.deallocating_end(&self.alloc);
|
||||
self.range.deallocating_end(self.alloc.clone());
|
||||
None
|
||||
} else {
|
||||
self.length -= 1;
|
||||
Some(unsafe { self.range.deallocating_next_back_unchecked(&self.alloc) })
|
||||
Some(unsafe { self.range.deallocating_next_back_unchecked(self.alloc.clone()) })
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1849,7 +1849,7 @@ where
|
||||
type Item = (K, V);
|
||||
|
||||
fn next(&mut self) -> Option<(K, V)> {
|
||||
self.inner.next(&mut self.pred, &self.alloc)
|
||||
self.inner.next(&mut self.pred, self.alloc.clone())
|
||||
}
|
||||
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
|
@ -1320,7 +1320,7 @@ where
|
||||
fn next(&mut self) -> Option<T> {
|
||||
let pred = &mut self.pred;
|
||||
let mut mapped_pred = |k: &T, _v: &mut ()| pred(k);
|
||||
self.inner.next(&mut mapped_pred, &self.alloc).map(|(k, _)| k)
|
||||
self.inner.next(&mut mapped_pred, self.alloc.clone()).map(|(k, _)| k)
|
||||
}
|
||||
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user