diff --git a/src/command/bc125at/firmware_version.rs b/src/command/bc125at/firmware_version.rs index c2c1b2d..2507378 100644 --- a/src/command/bc125at/firmware_version.rs +++ b/src/command/bc125at/firmware_version.rs @@ -5,10 +5,8 @@ use tokio_util::bytes::Bytes; use crate::command::{Response, command}; #[derive(Debug, thiserror::Error)] -pub enum FirmwareVersionError { - #[error("invalid UTF-8 bytes")] - Utf8Error(#[from] Utf8Error), -} +#[error("invalid UTF-8 bytes")] +pub struct FirmwareVersionError(#[from] pub Utf8Error); #[derive(Debug)] pub struct FirmwareVersion(pub String); diff --git a/src/command/bc125at/mod.rs b/src/command/bc125at/mod.rs index 4bee70e..835aca9 100644 --- a/src/command/bc125at/mod.rs +++ b/src/command/bc125at/mod.rs @@ -3,7 +3,7 @@ mod program_mode; mod squelch; mod volume; -pub use firmware_version::GetFirmwareVersion; +pub use firmware_version::{FirmwareVersion, FirmwareVersionError, GetFirmwareVersion}; pub use program_mode::{EnterProgramMode, ExitProgramMode}; pub use squelch::{GetSquelchLevel, SetSquelchLevel, SquelchLevel, SquelchLevelError}; pub use volume::{GetVolumeLevel, SetVolumeLevel, VolumeLevel, VolumeLevelError};