diff options
| author | 2023-05-11 16:45:08 +0200 | |
|---|---|---|
| committer | 2023-05-11 16:45:08 +0200 | |
| commit | 669f7cc74b2e7918e86a8197916f503f2d3d9b93 (patch) | |
| tree | acb365358235be6ce115b50db9404d890b6e77a6 /core/src/hasher.rs | |
| parent | bc62013b6cde52174bf4c4286939cf170bfa7760 (diff) | |
| parent | 63d3fc6996b848e10e77e6924bfebdf6ba82852e (diff) | |
| download | iced-669f7cc74b2e7918e86a8197916f503f2d3d9b93.tar.gz iced-669f7cc74b2e7918e86a8197916f503f2d3d9b93.tar.bz2 iced-669f7cc74b2e7918e86a8197916f503f2d3d9b93.zip | |
Merge pull request #1830 from iced-rs/advanced-text
Advanced text
Diffstat (limited to 'core/src/hasher.rs')
| -rw-r--r-- | core/src/hasher.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/src/hasher.rs b/core/src/hasher.rs new file mode 100644 index 00000000..fa52f16d --- /dev/null +++ b/core/src/hasher.rs @@ -0,0 +1,13 @@ +/// The hasher used to compare layouts. +#[derive(Debug, Default)] +pub struct Hasher(twox_hash::XxHash64); + +impl core::hash::Hasher for Hasher { + fn write(&mut self, bytes: &[u8]) { + self.0.write(bytes) + } + + fn finish(&self) -> u64 { + self.0.finish() + } +} |
