Use generic Hasher in stopwatch
This commit is contained in:
parent
65ff3744a0
commit
7715486906
1 changed files with 4 additions and 3 deletions
|
|
@ -155,12 +155,13 @@ mod time {
|
||||||
|
|
||||||
struct Every(std::time::Duration);
|
struct Every(std::time::Duration);
|
||||||
|
|
||||||
impl<Input> iced_native::subscription::Recipe<iced_native::Hasher, Input>
|
impl<Hasher, Input> iced_native::subscription::Recipe<Hasher, Input> for Every
|
||||||
for Every
|
where
|
||||||
|
Hasher: std::hash::Hasher,
|
||||||
{
|
{
|
||||||
type Output = std::time::Instant;
|
type Output = std::time::Instant;
|
||||||
|
|
||||||
fn hash(&self, state: &mut iced_native::Hasher) {
|
fn hash(&self, state: &mut Hasher) {
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
|
|
||||||
std::any::TypeId::of::<Self>().hash(state);
|
std::any::TypeId::of::<Self>().hash(state);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue