Replace internal declarations with those from objc2-core-bluetooth #407
Annotations
12 warnings
format
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
format
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
assigning the result of `Clone::clone()` may be inefficient:
src/corebluetooth/peripheral.rs#L156
warning: assigning the result of `Clone::clone()` may be inefficient
--> src/corebluetooth/peripheral.rs:156:25
|
156 | properties.services = services.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `properties.services.clone_from(&services)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: `#[warn(clippy::assigning_clones)]` on by default
|
usage of `contains_key` followed by `insert` on a `HashMap`:
src/corebluetooth/internal.rs#L535
warning: usage of `contains_key` followed by `insert` on a `HashMap`
--> src/corebluetooth/internal.rs:535:9
|
535 | / if self.peripherals.contains_key(&uuid) {
536 | | if let Some(name) = name {
537 | | self.dispatch_event(CoreBluetoothEvent::DeviceUpdated {
538 | | uuid,
... |
553 | | .await;
554 | | }
| |_________^
|
= 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
|
535 ~ if let std::collections::hash_map::Entry::Vacant(e) = self.peripherals.entry(uuid) {
536 + // Create our channels
537 + let (event_sender, event_receiver) = mpsc::channel(256);
538 + e.insert(PeripheralInternal::new(peripheral, event_sender));
539 + self.dispatch_event(CoreBluetoothEvent::DeviceDiscovered {
540 + uuid,
541 + name: name.map(|name| name.to_string()),
542 + event_receiver,
543 + })
544 + .await;
545 + } else {
546 + if let Some(name) = name {
547 + self.dispatch_event(CoreBluetoothEvent::DeviceUpdated {
548 + uuid,
549 + name: name.to_string(),
550 + })
551 + .await;
552 + }
553 + }
|
|
deref which would be done by auto-deref:
src/corebluetooth/internal.rs#L92
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
|
redundant field names in struct initialization:
src/corebluetooth/peripheral.rs#L171
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
|
build (macOS-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
build (macOS-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
build (ubuntu-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
build (ubuntu-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
build (windows-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
build (windows-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|