mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Replace option.map(cond) == Some(true)
with option.is_some_and(cond)
This commit is contained in:
parent
fec3828c5f
commit
b68f5311b5
3 changed files with 3 additions and 3 deletions
|
@ -316,7 +316,7 @@ fn check_trailing_ws(path: &Path, text: &str) {
|
|||
return;
|
||||
}
|
||||
for (line_number, line) in text.lines().enumerate() {
|
||||
if line.chars().last().map(char::is_whitespace) == Some(true) {
|
||||
if line.chars().last().is_some_and(char::is_whitespace) {
|
||||
panic!("Trailing whitespace in {} at line {}", path.display(), line_number + 1)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue