build: Add Android CI and fix jni/jni_utils version #431
clippy macOS-latest
5 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 5 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.81.0 (eeb90cda1 2024-09-04)
- cargo 1.81.0 (2dbb1af80 2024-08-20)
- clippy 0.1.81 (eeb90cda 2024-09-04)
Annotations
Check warning on line 575 in src/corebluetooth/internal.rs
github-actions / clippy macOS-latest
usage of `contains_key` followed by `insert` on a `HashMap`
warning: usage of `contains_key` followed by `insert` on a `HashMap`
--> src/corebluetooth/internal.rs:556:9
|
556 | / if self.peripherals.contains_key(&uuid) {
557 | | if let Some(name) = name {
558 | | self.dispatch_event(CoreBluetoothEvent::DeviceUpdated {
559 | | uuid,
... |
574 | | .await;
575 | | }
| |_________^
|
= 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
help: try
|
556 ~ if let std::collections::hash_map::Entry::Vacant(e) = self.peripherals.entry(uuid) {
557 + // Create our channels
558 + let (event_sender, event_receiver) = mpsc::channel(256);
559 + e.insert(PeripheralInternal::new(peripheral, event_sender));
560 + self.dispatch_event(CoreBluetoothEvent::DeviceDiscovered {
561 + uuid,
562 + name: name.map(|name| name.to_string()),
563 + event_receiver,
564 + })
565 + .await;
566 + } else {
567 + if let Some(name) = name {
568 + self.dispatch_event(CoreBluetoothEvent::DeviceUpdated {
569 + uuid,
570 + name: name.to_string(),
571 + })
572 + .await;
573 + }
574 + }
|
Check warning on line 92 in src/corebluetooth/internal.rs
github-actions / clippy macOS-latest
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/corebluetooth/internal.rs:92:61
|
92 | let properties = CharacteristicInternal::form_flags(&*characteristic);
| ^^^^^^^^^^^^^^^^ help: try: `&characteristic`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
Check warning on line 39 in src/corebluetooth/future.rs
github-actions / clippy macOS-latest
doc list item without indentation
warning: doc list item without indentation
--> src/corebluetooth/future.rs:39:9
|
39 | /// corresponding future.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
39 | /// corresponding future.
| ++
Check warning on line 694 in src/corebluetooth/central_delegate.rs
github-actions / clippy macOS-latest
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/corebluetooth/central_delegate.rs:694:48
|
694 | data: get_descriptor_value(&descriptor),
| ^^^^^^^^^^^ help: change this to: `descriptor`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Check warning on line 171 in src/corebluetooth/peripheral.rs
github-actions / clippy macOS-latest
redundant field names in struct initialization
warning: redundant field names in struct initialization
--> src/corebluetooth/peripheral.rs:171:16
|
171 | Self { shared: shared }
| ^^^^^^^^^^^^^^ help: replace it with: `shared`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default