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

server: fix clippy::manual_unwrap_or_default finding #399

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

cpu
Copy link
Member

@cpu cpu commented Mar 28, 2024

warning: match can be simplified with `.unwrap_or_default()`
   --> src/server.rs:486:13
    |
486 | /             match client_hello.server_name() {
487 | |                 Some(c) => c,
488 | |                 None => "",
489 | |             }
    | |_____________^ help: replace it with: `client_hello.server_name().unwrap_or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
    = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default

```
warning: match can be simplified with `.unwrap_or_default()`
   --> src/server.rs:486:13
    |
486 | /             match client_hello.server_name() {
487 | |                 Some(c) => c,
488 | |                 None => "",
489 | |             }
    | |_____________^ help: replace it with: `client_hello.server_name().unwrap_or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
    = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default
```
@cpu cpu self-assigned this Mar 28, 2024
@cpu cpu requested a review from ctz March 28, 2024 12:57
@cpu cpu merged commit c17b5c1 into rustls:main Mar 28, 2024
22 checks passed
@cpu cpu deleted the cpu-nightly-clippy-fix branch March 28, 2024 13:08
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.

2 participants