clippy
This commit is contained in:
@@ -195,7 +195,7 @@ pub enum TransactionStatus {
|
|||||||
|
|
||||||
/// Checksum types according to the
|
/// Checksum types according to the
|
||||||
/// [SANA Checksum Types registry](https://sanaregistry.org/r/checksum_identifiers/)
|
/// [SANA Checksum Types registry](https://sanaregistry.org/r/checksum_identifiers/)
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, TryFromPrimitive, IntoPrimitive)]
|
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq, TryFromPrimitive, IntoPrimitive)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
@@ -209,15 +209,10 @@ pub enum ChecksumType {
|
|||||||
/// CRC32. Polynomial: 0x4C11DB7. Preferred checksum for now.
|
/// CRC32. Polynomial: 0x4C11DB7. Preferred checksum for now.
|
||||||
Crc32 = 3,
|
Crc32 = 3,
|
||||||
/// Null checksum (no checksum).
|
/// Null checksum (no checksum).
|
||||||
|
#[default]
|
||||||
NullChecksum = 15,
|
NullChecksum = 15,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ChecksumType {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::NullChecksum
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Raw null checksum.
|
/// Raw null checksum.
|
||||||
pub const NULL_CHECKSUM_U32: [u8; 4] = [0; 4];
|
pub const NULL_CHECKSUM_U32: [u8; 4] = [0; 4];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user