diff options
author | 2019-12-04 04:04:18 +0100 | |
---|---|---|
committer | 2019-12-04 04:04:18 +0100 | |
commit | 1f60e2820463ef9f7fe9dda5d8b8fa040fdd8666 (patch) | |
tree | b89bccbb53ee7e96b2ad8864b10eef5fcf947c2a /native/src | |
parent | 561c3641c6ac62333550c3017561fa7a18663f00 (diff) | |
download | iced-1f60e2820463ef9f7fe9dda5d8b8fa040fdd8666.tar.gz iced-1f60e2820463ef9f7fe9dda5d8b8fa040fdd8666.tar.bz2 iced-1f60e2820463ef9f7fe9dda5d8b8fa040fdd8666.zip |
Update `Image::hash_layout` to hash new `Handle`
Diffstat (limited to 'native/src')
-rw-r--r-- | native/src/widget/image.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/native/src/widget/image.rs b/native/src/widget/image.rs index 7a7138ff..20375822 100644 --- a/native/src/widget/image.rs +++ b/native/src/widget/image.rs @@ -102,7 +102,7 @@ where } fn hash_layout(&self, state: &mut Hasher) { - self.path.hash(state); + self.handle.hash(state); self.width.hash(state); self.height.hash(state); } @@ -172,6 +172,12 @@ impl From<&str> for Handle { } } +impl Hash for Handle { + fn hash<H: std::hash::Hasher>(&self, state: &mut H) { + self.id.hash(state); + } +} + /// The data of an [`Image`]. /// /// [`Image`]: struct.Image.html |