use core::uint;
use std::hash;
-use {Collection, Mutable, Set, MutableSet, MutableSeq};
+use {Mutable, Set, MutableSet, MutableSeq};
use vec::Vec;
+ // Take two BitV's, and return iterators of their words, where the shorter one
+ // has been padded with 0's
+ macro_rules! match_words(
+ ($a_expr:expr, $b_expr:expr) => ({
+ let a = $a_expr;
+ let b = $b_expr;
+ let a_len = a.storage.len();
+ let b_len = b.storage.len();
+
+ // have to uselessly pretend to pad the longer one for type matching
+ if a_len < b_len {
+ (a.mask_words(0).chain(iter::Repeat::new(0u).enumerate().take(b_len).skip(a_len)),
+ b.mask_words(0).chain(iter::Repeat::new(0u).enumerate().take(0).skip(0)))
+ } else {
+ (a.mask_words(0).chain(iter::Repeat::new(0u).enumerate().take(0).skip(0)),
+ b.mask_words(0).chain(iter::Repeat::new(0u).enumerate().take(a_len).skip(b_len)))
+ }
+ })
+ )
static TRUE: bool = true;
static FALSE: bool = false;