diff --git a/src/libstd/deque.rs b/src/libstd/deque.rs index 86b904be3cb..d8fca5c8532 100644 --- a/src/libstd/deque.rs +++ b/src/libstd/deque.rs @@ -28,6 +28,15 @@ impl Container for Deque { pure fn is_empty(&self) -> bool { self.len() == 0 } } +impl Mutable for Deque { + fn clear(&mut self) { + for vec::each_mut(self.elts) |x| { *x = None } + self.nelts = 0; + self.lo = 0; + self.hi = 0; + } +} + impl Deque { static pure fn new() -> Deque { Deque{nelts: 0, lo: 0, hi: 0,