add From impls for BitSet and GrowableBitSet
This commit is contained in:
parent
2d1e075079
commit
3e9d3d917a
@ -340,6 +340,12 @@ impl<T: Idx> BitRelations<BitSet<T>> for BitSet<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Idx> From<GrowableBitSet<T>> for BitSet<T> {
|
||||
fn from(bit_set: GrowableBitSet<T>) -> Self {
|
||||
bit_set.bit_set
|
||||
}
|
||||
}
|
||||
|
||||
/// A fixed-size bitset type with a partially dense, partially sparse
|
||||
/// representation. The bitset is broken into chunks, and chunks that are all
|
||||
/// zeros or all ones are represented and handled very efficiently.
|
||||
@ -1469,6 +1475,12 @@ impl<T: Idx> GrowableBitSet<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Idx> From<BitSet<T>> for GrowableBitSet<T> {
|
||||
fn from(bit_set: BitSet<T>) -> Self {
|
||||
Self { bit_set }
|
||||
}
|
||||
}
|
||||
|
||||
/// A fixed-size 2D bit matrix type with a dense representation.
|
||||
///
|
||||
/// `R` and `C` are index types used to identify rows and columns respectively;
|
||||
|
Loading…
x
Reference in New Issue
Block a user