Skip to content

fix: allow deserializing BDAddr from non-borrowed strings #443

fix: allow deserializing BDAddr from non-borrowed strings

fix: allow deserializing BDAddr from non-borrowed strings #443

GitHub Actions / clippy ubuntu-latest succeeded Nov 17, 2024 in 0s

clippy ubuntu-latest

1 warning

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 1
Note 0
Help 0

Versions

  • rustc 1.82.0 (f6e511eec 2024-10-15)
  • cargo 1.82.0 (8f40fc59f 2024-08-21)
  • clippy 0.1.82 (f6e511e 2024-10-15)

Annotations

Check warning on line 189 in src/bluez/adapter.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

this `match` can be collapsed into the outer `match`

warning: this `match` can be collapsed into the outer `match`
   --> src/bluez/adapter.rs:183:34
    |
183 |           } if id == adapter_id => match adapter_event {
    |  __________________________________^
184 | |             AdapterEvent::Powered { powered } => {
185 | |                 let state = get_central_state(powered);
186 | |                 Some(CentralEvent::StateUpdate(state))
187 | |             }
188 | |             _ => None,
189 | |         },
    | |_________^
    |
help: the outer pattern can be modified to include the inner pattern
   --> src/bluez/adapter.rs:182:20
    |
182 |             event: adapter_event,
    |                    ^^^^^^^^^^^^^ replace this binding
183 |         } if id == adapter_id => match adapter_event {
184 |             AdapterEvent::Powered { powered } => {
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `adapter_event`:
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
    = note: `#[warn(clippy::collapsible_match)]` on by default