diff --git a/src/option/from_stream.rs b/src/option/from_stream.rs index dc6d841..f0aafea 100644 --- a/src/option/from_stream.rs +++ b/src/option/from_stream.rs @@ -24,6 +24,7 @@ where .take_while(|elem| { elem.is_some() || { found_none = true; + // Stop processing the stream on `None` false } }) diff --git a/src/option/product.rs b/src/option/product.rs index ff61eaa..2238a91 100644 --- a/src/option/product.rs +++ b/src/option/product.rs @@ -48,6 +48,7 @@ where .take_while(|elem| { elem.is_some() || { found_none = true; + // Stop processing the stream on `None` false } }) diff --git a/src/option/sum.rs b/src/option/sum.rs index cd92f78..0570a1e 100644 --- a/src/option/sum.rs +++ b/src/option/sum.rs @@ -43,6 +43,7 @@ where .take_while(|elem| { elem.is_some() || { found_none = true; + // Stop processing the stream on error false } })