You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bug report related to the unstablemax_by_key feature tracked in #129. It may affect min_by_key and other related features as well, but I haven't investigated those.
The type signature of max_by_key itself appears correct:
The issue is caused by the bound K: FnMut(&S::Item) -> S::Item. The return type of K should probably be a new generic type parameter B instead of Self::Item.
The text was updated successfully, but these errors were encountered:
ramosbugs
changed the title
max_by_key expects key to have same type as stream item
StreamExt::max_by_key expects key to have same type as stream item
Feb 16, 2021
This is a bug report related to the
unstablemax_by_key
feature tracked in #129. It may affectmin_by_key
and other related features as well, but I haven't investigated those.The type signature of
max_by_key
itself appears correct:however, the underlying
MaxByKeyFuture
struct effectively requiresB
to matchSelf::Item
:The issue is caused by the bound
K: FnMut(&S::Item) -> S::Item
. The return type ofK
should probably be a new generic type parameterB
instead ofSelf::Item
.The text was updated successfully, but these errors were encountered: