diff options
| author | 2024-02-05 21:39:03 +0100 | |
|---|---|---|
| committer | 2024-02-05 21:39:03 +0100 | |
| commit | 2fb271a9764f2dd6f029ddab69beb04dc2749b70 (patch) | |
| tree | 71e21489627e15d123339c2506aae18ba0092ba0 /futures/src | |
| parent | 35bbee501fc1ab97c89d72472ad3cee59346601c (diff) | |
| download | iced-2fb271a9764f2dd6f029ddab69beb04dc2749b70.tar.gz iced-2fb271a9764f2dd6f029ddab69beb04dc2749b70.tar.bz2 iced-2fb271a9764f2dd6f029ddab69beb04dc2749b70.zip | |
Remove redundant `id` field in `subscription::Map`
Diffstat (limited to '')
| -rw-r--r-- | futures/src/subscription.rs | 9 | 
1 files changed, 2 insertions, 7 deletions
| diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs index 1ee291c1..e32227f6 100644 --- a/futures/src/subscription.rs +++ b/futures/src/subscription.rs @@ -160,7 +160,6 @@ struct Map<A, B, F>  where      F: Fn(A) -> B + 'static,  { -    id: TypeId,      recipe: Box<dyn Recipe<Output = A>>,      mapper: F,  } @@ -170,11 +169,7 @@ where      F: Fn(A) -> B + 'static,  {      fn new(recipe: Box<dyn Recipe<Output = A>>, mapper: F) -> Self { -        Map { -            id: TypeId::of::<F>(), -            recipe, -            mapper, -        } +        Map { recipe, mapper }      }  } @@ -187,7 +182,7 @@ where      type Output = B;      fn hash(&self, state: &mut Hasher) { -        self.id.hash(state); +        TypeId::of::<F>().hash(state);          self.recipe.hash(state);      } | 
