fix: remove unnecessary trait bound PartialEq from create_owning_memo (#2394)

This commit is contained in:
zroug 2024-03-02 13:27:22 +01:00 committed by GitHub
parent d72b12524e
commit 7996f835d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -165,7 +165,7 @@ pub fn create_owning_memo<T>(
f: impl Fn(Option<T>) -> (T, bool) + 'static,
) -> Memo<T>
where
T: PartialEq + 'static,
T: 'static,
{
Runtime::current().create_owning_memo(f)
}
@ -352,7 +352,7 @@ impl<T> Memo<T> {
#[track_caller]
pub fn new_owning(f: impl Fn(Option<T>) -> (T, bool) + 'static) -> Memo<T>
where
T: PartialEq + 'static,
T: 'static,
{
create_owning_memo(f)
}