diff --git a/packages/buttplug/src/lib.rs b/packages/buttplug/src/lib.rs index 0a905e4..2e11ca1 100644 --- a/packages/buttplug/src/lib.rs +++ b/packages/buttplug/src/lib.rs @@ -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)); } }); } diff --git a/packages/buttplug/src/webbluetooth/webbluetooth_hardware.rs b/packages/buttplug/src/webbluetooth/webbluetooth_hardware.rs index 94953f3..9202385 100644 --- a/packages/buttplug/src/webbluetooth/webbluetooth_hardware.rs +++ b/packages/buttplug/src/webbluetooth/webbluetooth_hardware.rs @@ -184,6 +184,7 @@ impl HardwareSpecializer for WebBluetoothHardwareSpecializer { pub enum WebBluetoothEvent { // This is the only way we have to get our endpoints back to device creation // right now. My god this is a mess. + #[allow(dead_code)] Connected(Vec), Disconnected, } @@ -201,6 +202,7 @@ pub enum WebBluetoothDeviceCommand { HardwareSubscribeCmd, oneshot::Sender>, ), + #[allow(dead_code)] Unsubscribe( HardwareUnsubscribeCmd, oneshot::Sender>, @@ -271,7 +273,7 @@ async fn run_webbluetooth_loop( //let web_btle_device = WebBluetoothDeviceImpl::new(device, char_map); info!("device created!"); let endpoints = char_map.keys().into_iter().cloned().collect(); - device_local_event_sender + let _ = device_local_event_sender .send(WebBluetoothEvent::Connected(endpoints)) .await; while let Some(msg) = device_command_receiver.recv().await { @@ -337,6 +339,7 @@ async fn run_webbluetooth_loop( #[derive(Debug)] pub struct WebBluetoothHardware { device_command_sender: mpsc::Sender, + #[allow(dead_code)] device_event_receiver: mpsc::Receiver, event_sender: broadcast::Sender, }