Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Replace unnecessary map_or #1221

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

caspermeijn
Copy link
Collaborator

Fixes clippy lints like this:

warning: this `map_or` is redundant
   --> prost-build/src/ast.rs:104:9
    |
104 | /         chars
105 | |             .next()
106 | |             .map_or(false, |c| c != ' ' || chars.next() == Some(' '))
    | |_____________________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default

Fixes clippy lints like this:
```
warning: this `map_or` is redundant
   --> prost-build/src/ast.rs:104:9
    |
104 | /         chars
105 | |             .next()
106 | |             .map_or(false, |c| c != ' ' || chars.next() == Some(' '))
    | |_____________________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default
```
@caspermeijn caspermeijn added this pull request to the merge queue Jan 8, 2025
Merged via the queue into tokio-rs:master with commit e74b0ae Jan 8, 2025
16 checks passed
@caspermeijn caspermeijn deleted the unnecessary_map_or branch January 8, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant