fix: suppress Rust compiler warnings in buttplug
- #[allow(dead_code)] on FFICallbackContextWrapper, Connected variant, Unsubscribe variant, and device_event_receiver field - let _ = for unused Result from callback.call1() (x2) and .send().await Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ type FFICallback = js_sys::Function;
|
||||
type FFICallbackContext = u32;
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
#[allow(dead_code)]
|
||||
pub struct FFICallbackContextWrapper(FFICallbackContext);
|
||||
|
||||
unsafe impl Send for FFICallbackContextWrapper {
|
||||
@@ -50,7 +51,7 @@ pub fn send_server_message(
|
||||
let buf = json.as_bytes();
|
||||
let this = JsValue::null();
|
||||
let uint8buf = unsafe { Uint8Array::new(&Uint8Array::view(buf)) };
|
||||
callback.call1(&this, &JsValue::from(uint8buf));
|
||||
let _ = callback.call1(&this, &JsValue::from(uint8buf));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +120,7 @@ pub fn buttplug_client_send_json_message(
|
||||
let buf = json.as_bytes();
|
||||
let this = JsValue::null();
|
||||
let uint8buf = unsafe { Uint8Array::new(&Uint8Array::view(buf)) };
|
||||
callback.call1(&this, &JsValue::from(uint8buf));
|
||||
let _ = callback.call1(&this, &JsValue::from(uint8buf));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user