Skip to content

fix: Fix JNI signature mismatches caused by bind_java_type! JObject m…

d81b3b4
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

jni-rs update to v0.22 #462

fix: Fix JNI signature mismatches caused by bind_java_type! JObject m…
d81b3b4
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy macOS-latest succeeded Apr 27, 2026 in 1s

clippy macOS-latest

55 warnings

Details

Results

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

Versions

  • rustc 1.95.0 (59807616e 2026-04-14)
  • cargo 1.95.0 (f2d3ce0bd 2026-03-21)
  • clippy 0.1.95 (59807616e1 2026-04-14)

Annotations

Check warning on line 295 in src/droidplug/jni_utils/ops.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

very complex type used. Consider factoring parts into `type` definitions

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

Check warning on line 153 in src/droidplug/jni_utils/ops.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

unneeded unit return type

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

Check warning on line 153 in src/droidplug/jni_utils/ops.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

unneeded unit return type

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

Check warning on line 153 in src/droidplug/jni_utils/ops.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

unneeded unit return type

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

Check warning on line 153 in src/droidplug/jni_utils/ops.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

unneeded unit return type

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

Check warning on line 153 in src/droidplug/jni_utils/ops.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

unneeded unit return type

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

Check warning on line 153 in src/droidplug/jni_utils/ops.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

unneeded unit return type

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

Check warning on line 153 in src/droidplug/jni_utils/ops.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

unneeded unit return type

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

Check warning on line 153 in src/droidplug/jni_utils/ops.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

unneeded unit return type

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

Check warning on line 153 in src/droidplug/jni_utils/ops.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

unneeded unit return type

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

Check warning on line 75 in src/droidplug/jni_utils/exceptions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~                         }
   |

Check warning on line 35 in src/droidplug/jni_utils/exceptions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

try not to call a closure in the expression where it is declared

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 ~             }),
   |

Check warning on line 1267 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~                 }
     |

Check warning on line 1268 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~             }
     |

Check warning on line 1237 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~             }
     |

Check warning on line 1194 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~                 }
     |

Check warning on line 1195 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~             }
     |

Check warning on line 1167 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~                     }
     |

Check warning on line 1169 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~             }
     |

Check warning on line 1140 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~                 }
     |

Check warning on line 1141 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~             }
     |

Check warning on line 1117 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~             }
     |

Check warning on line 1094 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~             }
     |

Check warning on line 1025 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~                 }
     |

Check warning on line 1026 in src/corebluetooth/internal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macOS-latest

this `if` statement can be collapsed

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 ~             }
     |