Skip to content

jni-rs update to v0.22 #519

jni-rs update to v0.22

jni-rs update to v0.22 #519

Triggered via pull request April 27, 2026 06:51
Status Failure
Total duration 1m 44s
Artifacts

rust.yml

on: pull_request
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

6 errors and 119 warnings
format
Process completed with exit code 1.
this loop never actually loops: src/bluez/peripheral.rs#L144
error: this loop never actually loops --> src/bluez/peripheral.rs:144:13 | 144 | / for (_, characteristic) in service.characteristics.iter() { 145 | | return characteristic.info.mtu.unwrap(); 146 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#never_loop = note: `#[deny(clippy::never_loop)]` on by default help: if you need the first element of the iterator, try writing | 144 - for (_, characteristic) in service.characteristics.iter() { 144 + if let Some((_, characteristic)) = service.characteristics.iter().next() { |
build (linux)
Clippy had exited with the 101 exit code
build (macos)
The strategy configuration was canceled because "build.linux" failed
build (windows)
The strategy configuration was canceled because "build.linux" failed
build (windows)
The operation was canceled.
format
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v2. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
redundant closure: src/droidplug/mod.rs#L15
warning: redundant closure --> src/droidplug/mod.rs:15:36 | 15 | GLOBAL_ADAPTER.get_or_try_init(|| adapter::Adapter::new())?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `adapter::Adapter::new` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
very complex type used. Consider factoring parts into `type` definitions: src/droidplug/jni_utils/ops.rs#L287
warning: very complex type used. Consider factoring parts into `type` definitions --> src/droidplug/jni_utils/ops.rs:287:14 | 287 | let arc: Arc< | ______________^ 288 | | dyn for<'c, 'd> Fn( 289 | | &'d mut Env<'c>, 290 | | JObject<'c>, ... | 294 | | ) -> JObject<'c>, 295 | | > = Arc::from(f); | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default
this `if` statement can be collapsed: src/droidplug/jni_utils/exceptions.rs#L62
warning: this `if` statement can be collapsed --> src/droidplug/jni_utils/exceptions.rs:62:21 | 62 | / if env.exception_check() { 63 | | if let Some(ex) = env.exception_occurred() { 64 | | env.exception_clear(); 65 | | if env.is_instance_of(&ex, class)? { ... | 75 | | } | |_____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` on by default help: collapse nested if block | 62 ~ if env.exception_check() 63 ~ && let Some(ex) = env.exception_occurred() { 64 | env.exception_clear(); ... 73 | } 74 ~ } |
try not to call a closure in the expression where it is declared: src/droidplug/jni_utils/exceptions.rs#L29
warning: try not to call a closure in the expression where it is declared --> src/droidplug/jni_utils/exceptions.rs:29:21 | 29 | try_result: (|| { | _____________________^ 30 | | if env.exception_check() { 31 | | Err(Error::JavaException) 32 | | } else { ... | 35 | | })(), | |____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#redundant_closure_call = note: `#[warn(clippy::redundant_closure_call)]` on by default help: try doing something like | 29 ~ try_result: (if env.exception_check() { 30 + Err(Error::JavaException) 31 + } else { 32 + Ok(block(env)) 33 ~ }), |
enclosing `Ok` and `?` operator are unneeded: src/droidplug/peripheral.rs#L452
warning: enclosing `Ok` and `?` operator are unneeded --> src/droidplug/peripheral.rs:452:13 | 452 | / Ok(obj 453 | | .get_connection_parameters(env) 454 | | .map_err(|e| Error::Other(format!("{:?}", e).into()))?) | |_______________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#needless_question_mark = note: `#[warn(clippy::needless_question_mark)]` on by default help: remove the enclosing `Ok` and `?` operator | 452 ~ obj 453 | .get_connection_parameters(env) 454 ~ .map_err(|e| Error::Other(format!("{:?}", e).into())) |
this expression borrows a value the compiler would automatically borrow: src/droidplug/peripheral.rs#L262
warning: this expression borrows a value the compiler would automatically borrow --> src/droidplug/peripheral.rs:262:9 | 262 | (&guard.services).clone() | ^^^^^^^^^^^^^^^^^ help: change this to: `guard.services` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: src/droidplug/peripheral.rs#L207
warning: this expression borrows a value the compiler would automatically borrow --> src/droidplug/peripheral.rs:207:9 | 207 | (&guard.characteristics).clone() | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `guard.characteristics` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: src/droidplug/peripheral.rs#L202
warning: this expression borrows a value the compiler would automatically borrow --> src/droidplug/peripheral.rs:202:12 | 202 | Ok((&guard.properties).clone()) | ^^^^^^^^^^^^^^^^^^^ help: change this to: `guard.properties` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
associated function `from_env` is never used: src/droidplug/jni_utils/stream.rs#L51
warning: associated function `from_env` is never used --> src/droidplug/jni_utils/stream.rs:51:12 | 43 | impl JSendStream { | ---------------- associated function in this implementation ... 51 | pub fn from_env(env: &mut Env, obj: &JObject) -> Result<Self> { | ^^^^^^^^
function `fn_once_function` is never used: src/droidplug/jni_utils/ops.rs#L183
warning: function `fn_once_function` is never used --> src/droidplug/jni_utils/ops.rs:183:14 | 183 | fn_once: fn_once_function, | ^^^^^^^^^^^^^^^^ | = note: this warning originates in the macro `define_fn_adapter` (in Nightly builds, run with -Z macro-backtrace for more info)
function `fn_once_bi_function` is never used: src/droidplug/jni_utils/ops.rs#L161
warning: function `fn_once_bi_function` is never used --> src/droidplug/jni_utils/ops.rs:161:14 | 161 | fn_once: fn_once_bi_function, | ^^^^^^^^^^^^^^^^^^^ | = note: this warning originates in the macro `define_fn_adapter` (in Nightly builds, run with -Z macro-backtrace for more info)
associated function `from_env` is never used: src/droidplug/jni_utils/future.rs#L47
warning: associated function `from_env` is never used --> src/droidplug/jni_utils/future.rs:47:12 | 39 | impl JSendFuture { | ---------------- associated function in this implementation ... 47 | pub fn from_env(env: &mut Env, obj: &JObject) -> Result<Self> { | ^^^^^^^^
function `throw_unwind` is never used: src/droidplug/jni_utils/exceptions.rs#L198
warning: function `throw_unwind` is never used --> src/droidplug/jni_utils/exceptions.rs:198:8 | 198 | pub fn throw_unwind<R>( | ^^^^^^^^^^^^
methods `catch` and `result` are never used: src/droidplug/jni_utils/exceptions.rs#L41
warning: methods `catch` and `result` are never used --> src/droidplug/jni_utils/exceptions.rs:41:12 | 40 | impl<T> TryCatchResult<T> { | ------------------------- methods in this implementation 41 | pub fn catch<'local>( | ^^^^^ ... 91 | pub fn result(self) -> Result<T, Error> { | ^^^^^^
function `try_block` is never used: src/droidplug/jni_utils/exceptions.rs#L24
warning: function `try_block` is never used --> src/droidplug/jni_utils/exceptions.rs:24:8 | 24 | pub fn try_block<T>( | ^^^^^^^^^
struct `TryCatchResult` is never constructed: src/droidplug/jni_utils/exceptions.rs#L16
warning: struct `TryCatchResult` is never constructed --> src/droidplug/jni_utils/exceptions.rs:16:12 | 16 | pub struct TryCatchResult<T> { | ^^^^^^^^^^^^^^
field `mtu` is never read: src/droidplug/peripheral.rs#L121
warning: field `mtu` is never read --> src/droidplug/peripheral.rs:121:5 | 117 | struct PeripheralShared { | ---------------- field in this struct ... 121 | mtu: AtomicU16, | ^^^ | = note: `PeripheralShared` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
function `notifications_stream_from_broadcast_receiver` is never used: src/common/util.rs#L14
warning: function `notifications_stream_from_broadcast_receiver` is never used --> src/common/util.rs:14:8 | 14 | pub fn notifications_stream_from_broadcast_receiver( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
very complex type used. Consider factoring parts into `type` definitions: src/droidplug/jni_utils/ops.rs#L287
warning: very complex type used. Consider factoring parts into `type` definitions --> src/droidplug/jni_utils/ops.rs:287:14 | 287 | let arc: Arc< | ______________^ 288 | | dyn for<'c, 'd> Fn( 289 | | &'d mut Env<'c>, 290 | | JObject<'c>, ... | 294 | | ) -> JObject<'c>, 295 | | > = Arc::from(f); | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default
this `if` statement can be collapsed: src/droidplug/jni_utils/exceptions.rs#L62
warning: this `if` statement can be collapsed --> src/droidplug/jni_utils/exceptions.rs:62:21 | 62 | / if env.exception_check() { 63 | | if let Some(ex) = env.exception_occurred() { 64 | | env.exception_clear(); 65 | | if env.is_instance_of(&ex, class)? { ... | 75 | | } | |_____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 62 ~ if env.exception_check() 63 ~ && let Some(ex) = env.exception_occurred() { 64 | env.exception_clear(); ... 73 | } 74 ~ } |
try not to call a closure in the expression where it is declared: src/droidplug/jni_utils/exceptions.rs#L29
warning: try not to call a closure in the expression where it is declared --> src/droidplug/jni_utils/exceptions.rs:29:21 | 29 | try_result: (|| { | _____________________^ 30 | | if env.exception_check() { 31 | | Err(Error::JavaException) 32 | | } else { ... | 35 | | })(), | |____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#redundant_closure_call = note: `#[warn(clippy::redundant_closure_call)]` on by default help: try doing something like | 29 ~ try_result: (if env.exception_check() { 30 + Err(Error::JavaException) 31 + } else { 32 + Ok(block(env)) 33 ~ }), |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L1249
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:1249:13 | 1249 | / if let Some(service) = peripheral.services.get_mut(&service_uuid) { 1250 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 1251 | | { 1252 | | if let Some(descriptor) = characteristic.descriptors.get_mut(&descriptor_uuid) { ... | 1267 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 1249 ~ if let Some(service) = peripheral.services.get_mut(&service_uuid) 1250 ~ && let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 1251 | { ... 1265 | } 1266 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L1248
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:1248:9 | 1248 | / if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) { 1249 | | if let Some(service) = peripheral.services.get_mut(&service_uuid) { 1250 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... | 1268 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 1248 ~ if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) 1249 ~ && let Some(service) = peripheral.services.get_mut(&service_uuid) { 1250 | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... 1266 | } 1267 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L1229
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:1229:9 | 1229 | / if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) { 1230 | | if let Err(e) = peripheral 1231 | | .event_sender 1232 | | .send(PeripheralEventInternal::TxPowerLevel(tx_power_level)) ... | 1237 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 1229 ~ if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) 1230 ~ && let Err(e) = peripheral 1231 | .event_sender ... 1235 | error!("Error sending tx_power_level event: {}", e); 1236 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L1181
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:1181:13 | 1181 | / if let Some(service) = peripheral.services.get_mut(&service_uuid) { 1182 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 1183 | | { 1184 | | if let Some(descriptor) = characteristic.descriptors.get_mut(&descriptor_uuid) { ... | 1194 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 1181 ~ if let Some(service) = peripheral.services.get_mut(&service_uuid) 1182 ~ && let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 1183 | { ... 1192 | } 1193 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L1180
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:1180:9 | 1180 | / if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) { 1181 | | if let Some(service) = peripheral.services.get_mut(&service_uuid) { 1182 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... | 1195 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 1180 ~ if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) 1181 ~ && let Some(service) = peripheral.services.get_mut(&service_uuid) { 1182 | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... 1193 | } 1194 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L1155
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:1155:17 | 1155 | / if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 1156 | | { 1157 | | if let Some(descriptor) = characteristic.descriptors.get_mut(&descriptor_uuid) { 1158 | | trace!("Writing descriptor value!"); ... | 1167 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 1155 ~ if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 1156 ~ && let Some(descriptor) = characteristic.descriptors.get_mut(&descriptor_uuid) { 1157 | trace!("Writing descriptor value!"); ... 1164 | descriptor.write_future_state.push_front(fut); 1165 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L1153
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:1153:9 | 1153 | / if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) { 1154 | | if let Some(service) = peripheral.services.get_mut(&service_uuid) { 1155 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... | 1169 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 1153 ~ if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) 1154 ~ && let Some(service) = peripheral.services.get_mut(&service_uuid) { 1155 | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... 1167 | } 1168 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L1128
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:1128:13 | 1128 | / if let Some(service) = peripheral.services.get_mut(&service_uuid) { 1129 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 1130 | | { 1131 | | trace!("Setting subscribe!"); ... | 1140 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 1128 ~ if let Some(service) = peripheral.services.get_mut(&service_uuid) 1129 ~ && let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 1130 | { ... 1138 | characteristic.unsubscribe_future_state.push_front(fut); 1139 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L1127
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:1127:9 | 1127 | / if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) { 1128 | | if let Some(service) = peripheral.services.get_mut(&service_uuid) { 1129 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... | 1141 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 1127 ~ if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) 1128 ~ && let Some(service) = peripheral.services.get_mut(&service_uuid) { 1129 | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... 1139 | } 1140 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L1104
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:1104:9 | 1104 | / if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) { 1105 | | if let Some(service) = peripheral.services.get_mut(&service_uuid) { 1106 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... | 1117 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 1104 ~ if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) 1105 ~ && let Some(service) = peripheral.services.get_mut(&service_uuid) { 1106 | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... 1115 | } 1116 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L1081
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:1081:9 | 1081 | / if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) { 1082 | | if let Some(service) = peripheral.services.get_mut(&service_uuid) { 1083 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... | 1094 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 1081 ~ if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) 1082 ~ && let Some(service) = peripheral.services.get_mut(&service_uuid) { 1083 | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... 1092 | } 1093 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L986
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:986:13 | 986 | / if let Some(service) = peripheral.services.get_mut(&service_uuid) { 987 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 988 | | { 989 | | trace!("Writing value! With kind {:?}", kind); ... | 1025 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 986 ~ if let Some(service) = peripheral.services.get_mut(&service_uuid) 987 ~ && let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 988 | { ... 1023 | } 1024 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L985
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:985:9 | 985 | / if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) { 986 | | if let Some(service) = peripheral.services.get_mut(&service_uuid) { 987 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... | 1026 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 985 ~ if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) 986 ~ && let Some(service) = peripheral.services.get_mut(&service_uuid) { 987 | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... 1024 | } 1025 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L891
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:891:13 | 891 | / if let Some(service) = peripheral.services.get_mut(&service_uuid) { 892 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 893 | | { 894 | | trace!("Got read event!"); ... | 922 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 891 ~ if let Some(service) = peripheral.services.get_mut(&service_uuid) 892 ~ && let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) 893 | { ... 920 | } 921 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L890
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:890:9 | 890 | / if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) { 891 | | if let Some(service) = peripheral.services.get_mut(&service_uuid) { 892 | | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... | 923 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 890 ~ if let Some(peripheral) = self.peripherals.get_mut(&peripheral_uuid) 891 ~ && let Some(service) = peripheral.services.get_mut(&service_uuid) { 892 | if let Some(characteristic) = service.characteristics.get_mut(&characteristic_uuid) ... 921 | } 922 ~ } |
usage of `contains_key` followed by `insert` on a `HashMap`: src/corebluetooth/internal.rs#L646
warning: usage of `contains_key` followed by `insert` on a `HashMap` --> src/corebluetooth/internal.rs:646:9 | 646 | / if self.peripherals.contains_key(&uuid) { 647 | | if local_name.is_some() || advertisement_name.is_some() { 648 | | self.dispatch_event(CoreBluetoothEvent::DeviceUpdated { 649 | | uuid, ... | 666 | | .await; 667 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#map_entry = note: `#[warn(clippy::map_entry)]` on by default help: try | 646 ~ if let std::collections::hash_map::Entry::Vacant(e) = self.peripherals.entry(uuid) { 647 + // Create our channels 648 + let (event_sender, event_receiver) = mpsc::channel(256); 649 + e.insert(PeripheralInternal::new(peripheral, event_sender)); 650 + self.dispatch_event(CoreBluetoothEvent::DeviceDiscovered { 651 + uuid, 652 + local_name, 653 + advertisement_name, 654 + event_receiver, 655 + }) 656 + .await; 657 + } else { 658 + if local_name.is_some() || advertisement_name.is_some() { 659 + self.dispatch_event(CoreBluetoothEvent::DeviceUpdated { 660 + uuid, 661 + local_name, 662 + advertisement_name, 663 + }) 664 + .await; 665 + } 666 + } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L606
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:606:9 | 606 | / if let Some(p) = self.peripherals.get_mut(&peripheral_uuid) { 607 | | if let Err(e) = p 608 | | .event_sender 609 | | .send(PeripheralEventInternal::Services(services, rssi)) ... | 614 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 606 ~ if let Some(p) = self.peripherals.get_mut(&peripheral_uuid) 607 ~ && let Err(e) = p 608 | .event_sender ... 612 | error!("Error sending notification event: {}", e); 613 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L593
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:593:9 | 593 | / if let Some(p) = self.peripherals.get_mut(&peripheral_uuid) { 594 | | if let Err(e) = p 595 | | .event_sender 596 | | .send(PeripheralEventInternal::ServiceData(service_data, rssi)) ... | 601 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if help: collapse nested if block | 593 ~ if let Some(p) = self.peripherals.get_mut(&peripheral_uuid) 594 ~ && let Err(e) = p 595 | .event_sender ... 599 | error!("Error sending notification event: {}", e); 600 ~ } |
this `if` statement can be collapsed: src/corebluetooth/internal.rs#L571
warning: this `if` statement can be collapsed --> src/corebluetooth/internal.rs:571:9 | 571 | / if let Some(p) = self.peripherals.get_mut(&peripheral_uuid) { 572 | | if let Err(e) = p 573 | | .event_sender 574 | | .send(PeripheralEventInternal::ManufacturerData( ... | 583 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` on by default help: collapse nested if block | 571 ~ if let Some(p) = self.peripherals.get_mut(&peripheral_uuid) 572 ~ && let Err(e) = p 573 | .event_sender ... 581 | error!("Error sending notification event: {}", e); 582 ~ } |
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: src/corebluetooth/internal.rs#L394
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> src/corebluetooth/internal.rs:394:32 | 394 | .chain(unsubscribe_future_state.into_iter()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/59807616e1fa2540724bfbac14d7976d7e4a3860/library/core/src/iter/traits/iterator.rs:510:11 = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#useless_conversion help: consider removing the `.into_iter()` | 394 - .chain(unsubscribe_future_state.into_iter()); 394 + .chain(&*unsubscribe_future_state); |
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `VecDeque`: src/corebluetooth/internal.rs#L394
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `VecDeque` --> src/corebluetooth/internal.rs:394:57 | 394 | .chain(unsubscribe_future_state.into_iter()); | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#into_iter_on_ref
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `VecDeque`: src/corebluetooth/internal.rs#L393
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `VecDeque` --> src/corebluetooth/internal.rs:393:55 | 393 | .chain(subscribe_future_state.into_iter()) | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#into_iter_on_ref
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: src/corebluetooth/internal.rs#L392
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> src/corebluetooth/internal.rs:392:32 | 392 | .chain(write_future_state.into_iter()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/59807616e1fa2540724bfbac14d7976d7e4a3860/library/core/src/iter/traits/iterator.rs:510:11 = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default help: consider removing the `.into_iter()` | 392 - .chain(write_future_state.into_iter()) 392 + .chain(&*write_future_state) |
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `VecDeque`: src/corebluetooth/internal.rs#L392
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `VecDeque` --> src/corebluetooth/internal.rs:392:51 | 392 | .chain(write_future_state.into_iter()) | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#into_iter_on_ref
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `VecDeque`: src/corebluetooth/internal.rs#L391
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `VecDeque` --> src/corebluetooth/internal.rs:391:26 | 391 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#into_iter_on_ref = note: `#[warn(clippy::into_iter_on_ref)]` on by default
deref which would be done by auto-deref: src/corebluetooth/internal.rs#L254
warning: deref which would be done by auto-deref --> src/corebluetooth/internal.rs:254:74 | 254 | existing.properties = CharacteristicInternal::form_flags(&*cb_characteristic); | ^^^^^^^^^^^^^^^^^^^ help: try: `&cb_characteristic` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#explicit_auto_deref
deref which would be done by auto-deref: src/corebluetooth/internal.rs#L93
warning: deref which would be done by auto-deref --> src/corebluetooth/internal.rs:93:61 | 93 | let properties = CharacteristicInternal::form_flags(&*characteristic); | ^^^^^^^^^^^^^^^^ help: try: `&characteristic` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#explicit_auto_deref = note: `#[warn(clippy::explicit_auto_deref)]` on by default
doc list item without indentation: src/corebluetooth/future.rs#L39
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/rust-1.95.0/index.html#doc_lazy_continuation = note: `#[warn(clippy::doc_lazy_continuation)]` on by default help: indent this line | 39 | /// corresponding future. | ++
this expression creates a reference which is immediately dereferenced by the compiler: src/corebluetooth/central_delegate.rs#L792
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/corebluetooth/central_delegate.rs:792:48 | 792 | data: get_descriptor_value(&descriptor), | ^^^^^^^^^^^ help: change this to: `descriptor` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
associated functions `new` and `from_env` are never used: src/droidplug/jni_utils/stream.rs#L44
warning: associated functions `new` and `from_env` are never used --> src/droidplug/jni_utils/stream.rs:44:12 | 43 | impl JSendStream { | ---------------- associated functions in this implementation 44 | pub fn new(env: &mut Env, stream: &JStream) -> Result<Self> { | ^^^ ... 51 | pub fn from_env(env: &mut Env, obj: &JObject) -> Result<Self> { | ^^^^^^^^
function `fn_adapter_close_internal` is never used: src/droidplug/jni_utils/ops.rs#L337
warning: function `fn_adapter_close_internal` is never used --> src/droidplug/jni_utils/ops.rs:337:26 | 337 | pub(crate) extern "C" fn fn_adapter_close_internal(mut env: EnvUnowned, obj: JObject) { | ^^^^^^^^^^^^^^^^^^^^^^^^^
function `fn_adapter_call_internal` is never used: src/droidplug/jni_utils/ops.rs#L307
warning: function `fn_adapter_call_internal` is never used --> src/droidplug/jni_utils/ops.rs:307:26 | 307 | pub(crate) extern "C" fn fn_adapter_call_internal<'local>( | ^^^^^^^^^^^^^^^^^^^^^^^^
function `fn_once_function` is never used: src/droidplug/jni_utils/ops.rs#L183
warning: function `fn_once_function` is never used --> src/droidplug/jni_utils/ops.rs:183:14 | 183 | fn_once: fn_once_function, | ^^^^^^^^^^^^^^^^ | = note: this warning originates in the macro `define_fn_adapter` (in Nightly builds, run with -Z macro-backtrace for more info)
function `fn_once_bi_function` is never used: src/droidplug/jni_utils/ops.rs#L161
warning: function `fn_once_bi_function` is never used --> src/droidplug/jni_utils/ops.rs:161:14 | 161 | fn_once: fn_once_bi_function, | ^^^^^^^^^^^^^^^^^^^ | = note: this warning originates in the macro `define_fn_adapter` (in Nightly builds, run with -Z macro-backtrace for more info)
associated functions `new` and `from_env` are never used: src/droidplug/jni_utils/future.rs#L40
warning: associated functions `new` and `from_env` are never used --> src/droidplug/jni_utils/future.rs:40:12 | 39 | impl JSendFuture { | ---------------- associated functions in this implementation 40 | pub fn new(env: &mut Env, future: &JFuture) -> Result<Self> { | ^^^ ... 47 | pub fn from_env(env: &mut Env, obj: &JObject) -> Result<Self> { | ^^^^^^^^
function `throw_unwind` is never used: src/droidplug/jni_utils/exceptions.rs#L198
warning: function `throw_unwind` is never used --> src/droidplug/jni_utils/exceptions.rs:198:8 | 198 | pub fn throw_unwind<R>( | ^^^^^^^^^^^^
function `throw_panic` is never used: src/droidplug/jni_utils/exceptions.rs#L166
warning: function `throw_panic` is never used --> src/droidplug/jni_utils/exceptions.rs:166:8 | 166 | pub fn throw_panic( | ^^^^^^^^^^^
methods `catch` and `result` are never used: src/droidplug/jni_utils/exceptions.rs#L41
warning: methods `catch` and `result` are never used --> src/droidplug/jni_utils/exceptions.rs:41:12 | 40 | impl<T> TryCatchResult<T> { | ------------------------- methods in this implementation 41 | pub fn catch<'local>( | ^^^^^ ... 91 | pub fn result(self) -> Result<T, Error> { | ^^^^^^
function `try_block` is never used: src/droidplug/jni_utils/exceptions.rs#L24
warning: function `try_block` is never used --> src/droidplug/jni_utils/exceptions.rs:24:8 | 24 | pub fn try_block<T>( | ^^^^^^^^^
struct `TryCatchResult` is never constructed: src/droidplug/jni_utils/exceptions.rs#L16
warning: struct `TryCatchResult` is never constructed --> src/droidplug/jni_utils/exceptions.rs:16:12 | 16 | pub struct TryCatchResult<T> { | ^^^^^^^^^^^^^^
function `byte_array_to_vec` is never used: src/droidplug/jni_utils/arrays.rs#L16
warning: function `byte_array_to_vec` is never used --> src/droidplug/jni_utils/arrays.rs:16:8 | 16 | pub fn byte_array_to_vec(env: &Env, array: &JByteArray) -> Result<Vec<u8>> { | ^^^^^^^^^^^^^^^^^
function `slice_to_byte_array` is never used: src/droidplug/jni_utils/arrays.rs#L9
warning: function `slice_to_byte_array` is never used --> src/droidplug/jni_utils/arrays.rs:9:8 | 9 | pub fn slice_to_byte_array<'local>(env: &mut Env<'local>, slice: &[u8]) -> Result<JByteArray<'local>> { | ^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
redundant field names in struct initialization: src/corebluetooth/peripheral.rs#L196
warning: redundant field names in struct initialization --> src/corebluetooth/peripheral.rs:196:16 | 196 | Self { shared: shared } | ^^^^^^^^^^^^^^ help: replace it with: `shared` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#redundant_field_names = note: `#[warn(clippy::redundant_field_names)]` on by default
build (android)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions-rs/clippy-check@v1, actions-rs/toolchain@v1, actions/checkout@v2, actions/setup-java@v2. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
build (android)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (android)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (android)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (android)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
very complex type used. Consider factoring parts into `type` definitions: src/droidplug/jni_utils/ops.rs#L287
warning: very complex type used. Consider factoring parts into `type` definitions --> src/droidplug/jni_utils/ops.rs:287:14 | 287 | let arc: Arc< | ______________^ 288 | | dyn for<'c, 'd> Fn( 289 | | &'d mut Env<'c>, 290 | | JObject<'c>, ... | 294 | | ) -> JObject<'c>, 295 | | > = Arc::from(f); | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#unused_unit
unneeded unit return type: src/droidplug/jni_utils/ops.rs#L153
warning: unneeded unit return type --> src/droidplug/jni_utils/ops.rs:153:68 | 153 | signature: f: impl for<'c, 'd> Fn(&'d mut Env<'c>, JObject<'c>) -> (), | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default
this `if` statement can be collapsed: src/droidplug/jni_utils/exceptions.rs#L62
warning: this `if` statement can be collapsed --> src/droidplug/jni_utils/exceptions.rs:62:21 | 62 | / if env.exception_check() { 63 | | if let Some(ex) = env.exception_occurred() { 64 | | env.exception_clear(); 65 | | if env.is_instance_of(&ex, class)? { ... | 75 | | } | |_____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` on by default help: collapse nested if block | 62 ~ if env.exception_check() 63 ~ && let Some(ex) = env.exception_occurred() { 64 | env.exception_clear(); ... 73 | } 74 ~ } |
try not to call a closure in the expression where it is declared: src/droidplug/jni_utils/exceptions.rs#L29
warning: try not to call a closure in the expression where it is declared --> src/droidplug/jni_utils/exceptions.rs:29:21 | 29 | try_result: (|| { | _____________________^ 30 | | if env.exception_check() { 31 | | Err(Error::JavaException) 32 | | } else { ... | 35 | | })(), | |____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#redundant_closure_call = note: `#[warn(clippy::redundant_closure_call)]` on by default help: try doing something like | 29 ~ try_result: (if env.exception_check() { 30 + Err(Error::JavaException) 31 + } else { 32 + Ok(block(env)) 33 ~ }), |
iterating on a map's values: src/bluez/peripheral.rs#L393
warning: iterating on a map's values --> src/bluez/peripheral.rs:393:22 | 393 | descriptors: descriptors | ______________________^ 394 | | .iter() 395 | | .map(|(_, descriptor)| make_descriptor(descriptor, info.uuid, service_uuid)) | |________________________________________________________________________________________^ help: try: `descriptors.values().map(|descriptor| make_descriptor(descriptor, info.uuid, service_uuid))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#iter_kv_map = note: `#[warn(clippy::iter_kv_map)]` on by default
usage of `contains_key` followed by `insert` on a `HashMap`: src/bluez/peripheral.rs#L205
warning: usage of `contains_key` followed by `insert` on a `HashMap` --> src/bluez/peripheral.rs:205:29 | 205 | / ... if !map.contains_key(&characteristic.uuid) { 206 | | ... map.insert(characteristic.uuid, characteristic); 207 | | ... } | |_______________________^ help: try: `map.entry(characteristic.uuid).or_insert(characteristic);` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#map_entry = note: `#[warn(clippy::map_entry)]` on by default
this `match` can be collapsed into the outer `match`: src/bluez/adapter.rs#L210
warning: this `match` can be collapsed into the outer `match` --> src/bluez/adapter.rs:210:34 | 210 | } if id == adapter_id => match adapter_event { | __________________________________^ 211 | | AdapterEvent::Powered { powered } => { 212 | | let state = get_central_state(powered); 213 | | Some(vec![CentralEvent::StateUpdate(state)]) 214 | | } 215 | | _ => None, 216 | | }, | |_________^ | help: the outer pattern can be modified to include the inner pattern --> src/bluez/adapter.rs:209:20 | 209 | event: adapter_event, | ^^^^^^^^^^^^^ replace this binding 210 | } if id == adapter_id => match adapter_event { 211 | AdapterEvent::Powered { powered } => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `adapter_event: ` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#collapsible_match = note: `#[warn(clippy::collapsible_match)]` on by default
associated functions `new` and `from_env` are never used: src/droidplug/jni_utils/stream.rs#L44
warning: associated functions `new` and `from_env` are never used --> src/droidplug/jni_utils/stream.rs:44:12 | 43 | impl JSendStream { | ---------------- associated functions in this implementation 44 | pub fn new(env: &mut Env, stream: &JStream) -> Result<Self> { | ^^^ ... 51 | pub fn from_env(env: &mut Env, obj: &JObject) -> Result<Self> { | ^^^^^^^^
function `fn_adapter_close_internal` is never used: src/droidplug/jni_utils/ops.rs#L337
warning: function `fn_adapter_close_internal` is never used --> src/droidplug/jni_utils/ops.rs:337:26 | 337 | pub(crate) extern "C" fn fn_adapter_close_internal(mut env: EnvUnowned, obj: JObject) { | ^^^^^^^^^^^^^^^^^^^^^^^^^
function `fn_adapter_call_internal` is never used: src/droidplug/jni_utils/ops.rs#L307
warning: function `fn_adapter_call_internal` is never used --> src/droidplug/jni_utils/ops.rs:307:26 | 307 | pub(crate) extern "C" fn fn_adapter_call_internal<'local>( | ^^^^^^^^^^^^^^^^^^^^^^^^
function `fn_once_function` is never used: src/droidplug/jni_utils/ops.rs#L183
warning: function `fn_once_function` is never used --> src/droidplug/jni_utils/ops.rs:183:14 | 183 | fn_once: fn_once_function, | ^^^^^^^^^^^^^^^^ | = note: this warning originates in the macro `define_fn_adapter` (in Nightly builds, run with -Z macro-backtrace for more info)
function `fn_once_bi_function` is never used: src/droidplug/jni_utils/ops.rs#L161
warning: function `fn_once_bi_function` is never used --> src/droidplug/jni_utils/ops.rs:161:14 | 161 | fn_once: fn_once_bi_function, | ^^^^^^^^^^^^^^^^^^^ | = note: this warning originates in the macro `define_fn_adapter` (in Nightly builds, run with -Z macro-backtrace for more info)
associated functions `new` and `from_env` are never used: src/droidplug/jni_utils/future.rs#L40
warning: associated functions `new` and `from_env` are never used --> src/droidplug/jni_utils/future.rs:40:12 | 39 | impl JSendFuture { | ---------------- associated functions in this implementation 40 | pub fn new(env: &mut Env, future: &JFuture) -> Result<Self> { | ^^^ ... 47 | pub fn from_env(env: &mut Env, obj: &JObject) -> Result<Self> { | ^^^^^^^^
function `throw_unwind` is never used: src/droidplug/jni_utils/exceptions.rs#L198
warning: function `throw_unwind` is never used --> src/droidplug/jni_utils/exceptions.rs:198:8 | 198 | pub fn throw_unwind<R>( | ^^^^^^^^^^^^
function `throw_panic` is never used: src/droidplug/jni_utils/exceptions.rs#L166
warning: function `throw_panic` is never used --> src/droidplug/jni_utils/exceptions.rs:166:8 | 166 | pub fn throw_panic( | ^^^^^^^^^^^
methods `catch` and `result` are never used: src/droidplug/jni_utils/exceptions.rs#L41
warning: methods `catch` and `result` are never used --> src/droidplug/jni_utils/exceptions.rs:41:12 | 40 | impl<T> TryCatchResult<T> { | ------------------------- methods in this implementation 41 | pub fn catch<'local>( | ^^^^^ ... 91 | pub fn result(self) -> Result<T, Error> { | ^^^^^^
function `try_block` is never used: src/droidplug/jni_utils/exceptions.rs#L24
warning: function `try_block` is never used --> src/droidplug/jni_utils/exceptions.rs:24:8 | 24 | pub fn try_block<T>( | ^^^^^^^^^
struct `TryCatchResult` is never constructed: src/droidplug/jni_utils/exceptions.rs#L16
warning: struct `TryCatchResult` is never constructed --> src/droidplug/jni_utils/exceptions.rs:16:12 | 16 | pub struct TryCatchResult<T> { | ^^^^^^^^^^^^^^
function `byte_array_to_vec` is never used: src/droidplug/jni_utils/arrays.rs#L16
warning: function `byte_array_to_vec` is never used --> src/droidplug/jni_utils/arrays.rs:16:8 | 16 | pub fn byte_array_to_vec(env: &Env, array: &JByteArray) -> Result<Vec<u8>> { | ^^^^^^^^^^^^^^^^^
function `slice_to_byte_array` is never used: src/droidplug/jni_utils/arrays.rs#L9
warning: function `slice_to_byte_array` is never used --> src/droidplug/jni_utils/arrays.rs:9:8 | 9 | pub fn slice_to_byte_array<'local>(env: &mut Env<'local>, slice: &[u8]) -> Result<JByteArray<'local>> { | ^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
build (linux)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions-rs/clippy-check@v1, actions/checkout@v2. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
build (macos)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions-rs/clippy-check@v1, actions/checkout@v2. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
build (windows)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v2. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/