diff options
| author | Ian McIntyre <me@mciantyre.dev> | 2025-07-17 18:10:17 -0400 |
|---|---|---|
| committer | Ian McIntyre <me@mciantyre.dev> | 2025-07-17 20:44:19 -0400 |
| commit | 48b00ed3b83db5205b848f152f6e3139f5dea4b9 (patch) | |
| tree | bc7776979c86954f52844d0df368cfaa9f0d3573 /src/bd.rs | |
| parent | d2bee58caa082ed476d5b1d8bda39992df29fd07 (diff) | |
Let clippy fix warnings
Diffstat (limited to 'src/bd.rs')
| -rw-r--r-- | src/bd.rs | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -76,6 +76,12 @@ unsafe impl<D, const COUNT: usize, const MTU: usize> Sync for IoBuffers<D, COUNT pub type TransmitBuffers<const COUNT: usize, const MTU: usize> = IoBuffers<txbd::TxBD, COUNT, MTU>; pub type ReceiveBuffers<const COUNT: usize, const MTU: usize> = IoBuffers<rxbd::RxBD, COUNT, MTU>; +impl<D, const COUNT: usize, const MTU: usize> Default for IoBuffers<D, COUNT, MTU> { + fn default() -> Self { + Self::new() + } +} + impl<D, const COUNT: usize, const MTU: usize> IoBuffers<D, COUNT, MTU> { const MTU_IS_MULTIPLE_OF_16: () = assert!(MTU % 16 == 0); @@ -91,7 +97,7 @@ impl<D, const COUNT: usize, const MTU: usize> IoBuffers<D, COUNT, MTU> { fn init( &'static mut self, init_descriptors: impl Fn(&mut [D], &mut [DataBuffer<MTU>]), - ) -> IoSlices<D> { + ) -> IoSlices<'static, D> { // Safety: by taking 'static mut reference, we // ensure that we can only be called once. let ring = unsafe { self.ring.init() }; |
