From 1f60e2820463ef9f7fe9dda5d8b8fa040fdd8666 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 4 Dec 2019 04:04:18 +0100 Subject: Update `Image::hash_layout` to hash new `Handle` --- native/src/widget/image.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(&self, state: &mut H) { + self.id.hash(state); + } +} + /// The data of an [`Image`]. /// /// [`Image`]: struct.Image.html -- cgit