deque: separate the methods that need Copy
This commit is contained in:
parent
15879d3f74
commit
5832fe968f
@ -37,12 +37,14 @@ impl<T> Mutable for Deque<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Copy> Deque<T> {
|
||||
impl<T> Deque<T> {
|
||||
static pure fn new() -> Deque<T> {
|
||||
Deque{nelts: 0, lo: 0, hi: 0,
|
||||
elts: vec::from_fn(initial_capacity, |_| None)}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Copy> Deque<T> {
|
||||
fn add_front(&mut self, t: T) {
|
||||
let oldlo: uint = self.lo;
|
||||
if self.lo == 0u {
|
||||
|
Loading…
Reference in New Issue
Block a user