diff options
| author | bors <bors@rust-lang.org> | 2025-03-19 12:39:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-19 12:39:34 +0000 |
| commit | a7fc463dd8fbeca800d4b3efc501069502cffe64 (patch) | |
| tree | 097c6944fd8660666094e1c1f7adfca493dd37dc /library/core/src | |
| parent | c4b38a596767c9c6275c937cf3a2d4b9612b4875 (diff) | |
| parent | 3b7faca09c7a2e86390e354e83cb1acac6b3a1fd (diff) | |
Auto merge of #138693 - matthiaskrgr:rollup-ejq8mwp, r=matthiaskrgr
Rollup of 10 pull requests
Successful merges:
- #136177 (clarify BufRead::{fill_buf, consume} docs)
- #138654 (Remove the regex dependency from coretests)
- #138655 (rustc-dev-guide sync)
- #138656 (Remove double nesting in post-merge workflow)
- #138658 (CI: mirror alpine and centos images to ghcr)
- #138659 (coverage: Don't store a body span in `FunctionCoverageInfo`)
- #138661 (Revert: Add *_value methods to proc_macro lib)
- #138670 (Remove existing AFIDT implementation)
- #138674 (Various codegen_llvm cleanups)
- #138684 (use then in docs for `fuse` to enhance readability)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/iter/traits/iterator.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index 075da022854..3bbb52fdbcb 100644 --- a/library/core/src/iter/traits/iterator.rs +++ b/library/core/src/iter/traits/iterator.rs @@ -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) /// } /// } /// |
