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:
@@ -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<Endpoint>),
|
||||
Disconnected,
|
||||
}
|
||||
@@ -201,6 +202,7 @@ pub enum WebBluetoothDeviceCommand {
|
||||
HardwareSubscribeCmd,
|
||||
oneshot::Sender<Result<(), ButtplugDeviceError>>,
|
||||
),
|
||||
#[allow(dead_code)]
|
||||
Unsubscribe(
|
||||
HardwareUnsubscribeCmd,
|
||||
oneshot::Sender<Result<(), ButtplugDeviceError>>,
|
||||
@@ -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<WebBluetoothDeviceCommand>,
|
||||
#[allow(dead_code)]
|
||||
device_event_receiver: mpsc::Receiver<WebBluetoothEvent>,
|
||||
event_sender: broadcast::Sender<HardwareEvent>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user