From 5969e7ccd714f9b0fc127440a41bba9e11797e40 Mon Sep 17 00:00:00 2001 From: Ian McIntyre Date: Thu, 13 Jun 2024 10:22:36 -0400 Subject: [PATCH] Remove unused associated constants from trait These were prototyping leftovers from f4a369e77. clippy in the beta release train has started to detect them, so I assume they'll find their way into the next stable clippy release. --- src/common/lpspi.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/common/lpspi.rs b/src/common/lpspi.rs index 93493943..50ada391 100644 --- a/src/common/lpspi.rs +++ b/src/common/lpspi.rs @@ -1288,9 +1288,6 @@ impl eh02::blocking::spi::Write for Lpspi { /// Describes SPI words that can participate in transactions. trait Word: Copy + Into + TryFrom { - const MAX: Self; - const ZERO: Self; - /// Repeatedly call `provider` to produce yourself, /// then turn yourself into a LPSPI word. fn pack_word(bit_order: BitOrder, provider: impl FnMut() -> Option) -> u32; @@ -1301,8 +1298,6 @@ trait Word: Copy + Into + TryFrom { } impl Word for u8 { - const MAX: u8 = u8::MAX; - const ZERO: u8 = 0; fn pack_word(bit_order: BitOrder, mut provider: impl FnMut() -> Option) -> u32 { let mut word = 0; match bit_order { @@ -1333,8 +1328,6 @@ impl Word for u8 { } impl Word for u16 { - const MAX: u16 = u16::MAX; - const ZERO: u16 = 0; fn pack_word(bit_order: BitOrder, mut provider: impl FnMut() -> Option) -> u32 { let mut word = 0; match bit_order { @@ -1365,8 +1358,6 @@ impl Word for u16 { } impl Word for u32 { - const MAX: u32 = u32::MAX; - const ZERO: u32 = 0; fn pack_word(_: BitOrder, mut provider: impl FnMut() -> Option) -> u32 { provider().unwrap_or(0) }