Skip to content

Added support for Extended Advertising on Android #455

Added support for Extended Advertising on Android

Added support for Extended Advertising on Android #455

GitHub Actions / clippy ubuntu-latest succeeded Dec 21, 2024 in 1s

clippy ubuntu-latest

2 warnings

Details

Results

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

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 195 in src/bluez/peripheral.rs

See this annotation in the file changed.

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

usage of `contains_key` followed by `insert` on a `HashMap`

warning: usage of `contains_key` followed by `insert` on a `HashMap`
   --> src/bluez/peripheral.rs:193:29
    |
193 | / ...                   if !map.contains_key(&characteristic.uuid) {
194 | | ...                       map.insert(characteristic.uuid, characteristic);
195 | | ...                   }
    | |_______________________^ help: try: `map.entry(characteristic.uuid).or_insert(characteristic);`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry
    = note: `#[warn(clippy::map_entry)]` on by default

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