From 080875edc9effe5387b37b99d56b92302599c9ba Mon Sep 17 00:00:00 2001 From: k-nasa Date: Wed, 20 Nov 2019 00:25:48 +0900 Subject: [PATCH] update min_by_key doc --- src/stream/stream/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stream/stream/mod.rs b/src/stream/stream/mod.rs index ca386e0..48d865e 100644 --- a/src/stream/stream/mod.rs +++ b/src/stream/stream/mod.rs @@ -875,10 +875,10 @@ extension_trait! { use async_std::prelude::*; use async_std::stream; - let s = stream::from_iter(vec![1isize, 2, -3]); + let s = stream::from_iter(vec![-1isize, 2, -3]); let min = s.clone().min_by_key(|x| x.abs()).await; - assert_eq!(min, Some(1)); + assert_eq!(min, Some(-1)); let min = stream::empty::().min_by_key(|x| x.abs()).await; assert_eq!(min, None);