diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2023-11-25 10:21:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-25 10:21:06 +0100 |
| commit | 8e606a6928dc5ae15ab7c5cc579bb9d17845c8a1 (patch) | |
| tree | 66c684c4b36c2f5e1b1b8297295f71d697416df8 /src/tools | |
| parent | 0304aac0f3f740449f373971cdfa51a14576eab8 (diff) | |
| parent | 8cc7073d64578c81f5e6ed23120733040a22d78a (diff) | |
| download | rust-8e606a6928dc5ae15ab7c5cc579bb9d17845c8a1.tar.gz rust-8e606a6928dc5ae15ab7c5cc579bb9d17845c8a1.zip | |
Rollup merge of #118253 - dtolnay:issomeand, r=compiler-errors
Replace `option.map(cond) == Some(true)` with `option.is_some_and(cond)` Requested by `@fmease` in https://github.com/rust-lang/rust/pull/118226#pullrequestreview-1747432292. There is also a much larger number of `option.map_or(false, cond)` that can be changed separately if someone wants. r? fmease
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/compiletest/src/header.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index d6516cff63f..f85f9e674ab 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -632,7 +632,7 @@ fn iter_header_extra( it(None, directive, 0); } - let comment = if testfile.extension().map(|e| e == "rs") == Some(true) { "//" } else { "#" }; + let comment = if testfile.extension().is_some_and(|e| e == "rs") { "//" } else { "#" }; let mut rdr = BufReader::new(rdr); let mut ln = String::new(); |
