Update Image::hash_layout to hash new Handle

This commit is contained in:
Héctor Ramón Jiménez 2019-12-04 04:04:18 +01:00
parent 561c3641c6
commit 1f60e28204

View File

@ -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