From 77154869061594706185709d7b79ac520c8a125a Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 14 Dec 2019 02:12:25 +0100 Subject: Use generic `Hasher` in `stopwatch` --- examples/stopwatch.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/stopwatch.rs b/examples/stopwatch.rs index b902baae..686d239d 100644 --- a/examples/stopwatch.rs +++ b/examples/stopwatch.rs @@ -155,12 +155,13 @@ mod time { struct Every(std::time::Duration); - impl iced_native::subscription::Recipe - for Every + impl iced_native::subscription::Recipe for Every + where + Hasher: std::hash::Hasher, { type Output = std::time::Instant; - fn hash(&self, state: &mut iced_native::Hasher) { + fn hash(&self, state: &mut Hasher) { use std::hash::Hash; std::any::TypeId::of::().hash(state); -- cgit