diff options
| author | blake2-ppc <blake2-ppc> | 2013-07-30 02:48:40 +0200 |
|---|---|---|
| committer | blake2-ppc <blake2-ppc> | 2013-07-30 02:48:40 +0200 |
| commit | ae09d95160919f8801caa22e2867e9680e6cb05b (patch) | |
| tree | 9ec2977dad51b97ebfe63890e3539f00b250b8be | |
| parent | 5307d3674e2df2baef0e37125a98227590fc43d2 (diff) | |
| download | rust-ae09d95160919f8801caa22e2867e9680e6cb05b.tar.gz rust-ae09d95160919f8801caa22e2867e9680e6cb05b.zip | |
extra: Add .rev_iter() for bitv
| -rw-r--r-- | src/libextra/bitv.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libextra/bitv.rs b/src/libextra/bitv.rs index 914aa20792f..90824a653fa 100644 --- a/src/libextra/bitv.rs +++ b/src/libextra/bitv.rs @@ -409,6 +409,11 @@ impl Bitv { BitvIterator {bitv: self, next_idx: 0, end_idx: self.nbits} } + #[inline] + pub fn rev_liter<'a>(&'a self) -> Invert<BitvIterator<'a>> { + self.iter().invert() + } + /// Returns true if all bits are 0 pub fn is_false(&self) -> bool { match self.rep { |
