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
hi, it seems to me that max_by_key is wrong.
i'm not 100% sure since I just started playing with futures and the error messages are kind of harsher than I'm used to.
the doc seems wrong to me :
let s = stream::from_iter(vec![-1isize, -2, -3]);let max = s.clone().max_by_key(|x| x.abs()).await;assert_eq!(max,Some(3));
I would expect a max of -3 and not 3.
also in the source code, the MaxByKeyFuture has a key_by fn which returns a S::Item and not a B
The text was updated successfully, but these errors were encountered:
hi, it seems to me that max_by_key is wrong.
i'm not 100% sure since I just started playing with futures and the error messages are kind of harsher than I'm used to.
the doc seems wrong to me :
I would expect a max of -3 and not 3.
also in the source code, the MaxByKeyFuture has a key_by fn which returns a S::Item and not a B
The text was updated successfully, but these errors were encountered: