Fix missing Subscription type in iced_web

This commit is contained in:
Héctor Ramón Jiménez 2019-12-18 23:57:02 +01:00
parent 0f2e20f5e5
commit 9ca65c9f18
5 changed files with 47 additions and 3 deletions

21
web/src/hasher.rs Normal file
View 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()
}
}