diff --git a/src/cmd.rs b/src/cmd.rs index 151df4a..dddf1d9 100644 --- a/src/cmd.rs +++ b/src/cmd.rs @@ -4,7 +4,7 @@ use core::future::Future; -use crate::controller::{blocking, CmdError, ControllerCmdAsync, ControllerCmdSync, ErrorType}; +use crate::controller::{CmdError, ControllerCmdAsync, ControllerCmdSync, ErrorType}; use crate::param::param; use crate::{FixedSizeValue, FromHciBytes, HostToControllerPacket, PacketKind, WriteHci}; @@ -103,13 +103,6 @@ pub trait AsyncCmd: Cmd { ) -> impl Future::Error>>> { controller.exec(self) } - - fn exec_blocking>( - &self, - controller: &C, - ) -> Result<(), blocking::TryError::Error>>> { - controller.exec(self) - } } pub trait CmdReturnBuf: Copy + AsRef<[u8]> + AsMut<[u8]> { @@ -153,13 +146,6 @@ pub trait SyncCmd: Cmd { ) -> impl Future::Error>>> { controller.exec(self) } - - fn exec_blocking>( - &self, - controller: &C, - ) -> Result::Error>>> { - controller.exec(self) - } } #[macro_export] diff --git a/src/controller/blocking.rs b/src/controller/blocking.rs index 8c02cf0..2b1c4e1 100644 --- a/src/controller/blocking.rs +++ b/src/controller/blocking.rs @@ -1,8 +1,4 @@ -use crate::{ - cmd, - controller::{CmdError, ErrorType}, - data, ControllerToHostPacket, -}; +use crate::{controller::ErrorType, data, ControllerToHostPacket}; pub trait Controller: ErrorType { fn write_acl_data(&self, packet: &data::AclPacket) -> Result<(), Self::Error>; @@ -23,11 +19,3 @@ pub enum TryError { Error(E), Busy, } - -pub trait ControllerCmdSync: Controller { - fn exec(&self, cmd: &C) -> Result>>; -} - -pub trait ControllerCmdAsync: Controller { - fn exec(&self, cmd: &C) -> Result<(), TryError>>; -}