diff options
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 |