mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Derive hash for BitSet and BitMatrix
This commit is contained in:
parent
dde825db46
commit
d496cca3b1
@ -87,7 +87,7 @@ macro_rules! bit_relations_inherent_impls {
|
||||
/// to or greater than the domain size. All operations that involve two bitsets
|
||||
/// will panic if the bitsets have differing domain sizes.
|
||||
///
|
||||
#[derive(Eq, PartialEq, Decodable, Encodable)]
|
||||
#[derive(Eq, PartialEq, Hash, Decodable, Encodable)]
|
||||
pub struct BitSet<T> {
|
||||
domain_size: usize,
|
||||
words: Vec<Word>,
|
||||
@ -987,7 +987,7 @@ impl<T: Idx> GrowableBitSet<T> {
|
||||
///
|
||||
/// All operations that involve a row and/or column index will panic if the
|
||||
/// index exceeds the relevant bound.
|
||||
#[derive(Clone, Eq, PartialEq, Decodable, Encodable)]
|
||||
#[derive(Clone, Eq, PartialEq, Hash, Decodable, Encodable)]
|
||||
pub struct BitMatrix<R: Idx, C: Idx> {
|
||||
num_rows: usize,
|
||||
num_columns: usize,
|
||||
|
Loading…
Reference in New Issue
Block a user