UnsignedByteFieldError: Use struct variants #27

Merged
muellerr merged 2 commits from ubf-error-struct-variants into main 2023-08-28 17:27:35 +02:00
Showing only changes of commit 925b2aa8d8 - Show all commits

View File

@ -80,8 +80,7 @@ pub trait UnsignedEnumExt: UnsignedEnum + Debug + Copy + Clone + PartialEq + Eq
#[derive(Debug, Copy, Clone, PartialEq, Eq)] #[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum UnsignedByteFieldError { pub enum UnsignedByteFieldError {
/// Value is too large for specified width of byte field. The first value contains the width, /// Value is too large for specified width of byte field.
/// the second value contains the detected value.
ValueTooLargeForWidth { ValueTooLargeForWidth {
width: usize, width: usize,
value: u64, value: u64,