From b20514e87d45e77848e02d983049466e96b1bfce Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 31 May 2022 14:48:09 +0800 Subject: [PATCH] cleanup hosted mode warnings --- services/usb-device-xous/src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/usb-device-xous/src/main.rs b/services/usb-device-xous/src/main.rs index f06b87b85..b12424b98 100644 --- a/services/usb-device-xous/src/main.rs +++ b/services/usb-device-xous/src/main.rs @@ -25,9 +25,13 @@ use hosted::*; use num_traits::*; #[cfg(any(target_os = "none", target_os = "xous"))] use usb_device_xous::KeyboardLedsReport; -use usbd_human_interface_device::device::fido::{FidoInterface, FidoMsg}; +use usbd_human_interface_device::device::fido::FidoMsg; +#[cfg(any(target_os = "none", target_os = "xous"))] +use usbd_human_interface_device::device::fido::FidoInterface; use xous::{msg_scalar_unpack, msg_blocking_scalar_unpack}; -use core::ops::{DerefMut, Deref}; +use core::ops::DerefMut; +#[cfg(any(target_os = "none", target_os = "xous"))] +use core::ops::Deref; use core::num::NonZeroU8; use std::collections::BTreeMap; @@ -209,7 +213,9 @@ fn main() -> ! { let mut u2f_msg = FidoMsg::default(); assert_eq!(u2f_ipc.code, U2fCode::Tx, "Expected U2fCode::Tx in wrapper"); u2f_msg.deref_mut().copy_from_slice(&u2f_ipc.data); + #[cfg(any(target_os = "none", target_os = "xous"))] let u2f = composite.interface::, _>(); + #[cfg(any(target_os = "none", target_os = "xous"))] u2f.write_report(&u2f_msg).ok(); u2f_ipc.code = U2fCode::TxAck; } else {