Rollup merge of #138684 - bend-n:use_then, r=jhpratt

use then in docs for `fuse` to enhance readability

use the more-idiomatic `then_some` rather than an `if { some } else { none }` for `fused` docs
This commit is contained in:
Matthias Krüger 2025-03-19 08:17:19 +01:00 committed by GitHub
commit 3b7faca09c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1704,11 +1704,7 @@ pub trait Iterator {
/// self.state = self.state + 1;
///
/// // if it's even, Some(i32), else None
/// if val % 2 == 0 {
/// Some(val)
/// } else {
/// None
/// }
/// (val % 2 == 0).then_some(val)
/// }
/// }
///