modes:single: Implemented hashing on Singles (trivial).

This commit is contained in:
2026-04-05 04:18:06 +01:00
committed by oreodave
parent abf638e869
commit 3b8bdc5df9

View File

@@ -42,6 +42,14 @@ impl Display for Single {
}
}
use std::hash::{Hash, Hasher};
impl Hash for Single {
fn hash<H: Hasher>(&self, state: &mut H) {
self.0.hash(state);
}
}
#[cfg(test)]
mod tests {
use std::collections::{HashMap, HashSet};