Skip to content

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
@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