fix(android): remove unused JValue import and fix match arm types

Two cfg(android) issues hidden from Linux CI:
- android_clipboard.rs: JValue was imported but never used (JValueOwned
  covers all call sites). Removed to satisfy -D unused-imports.
- stats_plugin.rs: both arms of the clipboard match now return () via
  explicit block+semicolon, resolving the type mismatch that pinged-pong
  between runs due to bidirectional match-arm type inference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-05-08 21:53:36 -07:00
parent e43b329fc1
commit ab803c07af
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
pub fn set_text(text: &str) -> Result<(), String> {
use bevy::android::ANDROID_APP;
use jni::{
objects::{JObject, JValue, JValueOwned},
objects::{JObject, JValueOwned},
JavaVM,
};
+2 -2
View File
@@ -362,10 +362,10 @@ fn handle_copy_share_link_button(
#[cfg(target_os = "android")]
{
match crate::android_clipboard::set_text(&url) {
Ok(()) => toast.write(InfoToastEvent(format!("Copied: {url}"))),
Ok(()) => { toast.write(InfoToastEvent(format!("Copied: {url}"))); }
Err(e) => {
warn!("android clipboard failed: {e}");
toast.write(InfoToastEvent(format!("Share link: {url}")))
toast.write(InfoToastEvent(format!("Share link: {url}")));
}
}
}