Fix missing Subscription type in iced_web
This commit is contained in:
parent
0f2e20f5e5
commit
9ca65c9f18
5 changed files with 47 additions and 3 deletions
21
web/src/hasher.rs
Normal file
21
web/src/hasher.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
use std::collections::hash_map::DefaultHasher;
|
||||
|
||||
/// The hasher used to compare layouts.
|
||||
#[derive(Debug)]
|
||||
pub struct Hasher(DefaultHasher);
|
||||
|
||||
impl Default for Hasher {
|
||||
fn default() -> Self {
|
||||
Hasher(DefaultHasher::default())
|
||||
}
|
||||
}
|
||||
|
||||
impl core::hash::Hasher for Hasher {
|
||||
fn write(&mut self, bytes: &[u8]) {
|
||||
self.0.write(bytes)
|
||||
}
|
||||
|
||||
fn finish(&self) -> u64 {
|
||||
self.0.finish()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue