Implement IterBytes for Rc<T>.
This commit is contained in:
parent
b6ab4f2485
commit
ae836c1e44
@ -18,6 +18,7 @@ use cast;
|
||||
use container::Container;
|
||||
use iter::Iterator;
|
||||
use option::{None, Option, Some};
|
||||
use rc::Rc;
|
||||
use str::{Str, StrSlice};
|
||||
use vec::{Vector, ImmutableVector};
|
||||
|
||||
@ -325,6 +326,13 @@ impl<A:IterBytes> IterBytes for @mut A {
|
||||
}
|
||||
}
|
||||
|
||||
impl<A:IterBytes> IterBytes for Rc<A> {
|
||||
#[inline]
|
||||
fn iter_bytes(&self, lsb0: bool, f: Cb) -> bool {
|
||||
self.borrow().iter_bytes(lsb0, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl<A:IterBytes> IterBytes for ~A {
|
||||
#[inline]
|
||||
fn iter_bytes(&self, lsb0: bool, f: Cb) -> bool {
|
||||
|
Loading…
x
Reference in New Issue
Block a user