aboutsummaryrefslogtreecommitdiff
path: root/src/uart.rs
diff options
context:
space:
mode:
authorJames Munns <[email protected]>2025-11-13 17:50:11 +0100
committerJames Munns <[email protected]>2025-11-13 18:02:50 +0100
commit357a538e8d5f69c8c0aeacfd416f1ad99b0907d3 (patch)
treeaa209bf8dc7d3869f06bd6d5a3368771ee155b68 /src/uart.rs
parent9387d3352a39a903757860568e41890b022c990f (diff)
autofix clippy lints
Diffstat (limited to 'src/uart.rs')
-rw-r--r--src/uart.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/uart.rs b/src/uart.rs
index 3209a318d..cd504a6c6 100644
--- a/src/uart.rs
+++ b/src/uart.rs
@@ -118,7 +118,7 @@ impl<I: Instance> Uart<I> {
118 StopBits::Two => w.sbns().two(), 118 StopBits::Two => w.sbns().two(),
119 }; 119 };
120 // OSR field encodes (osr-1); use raw bits to avoid a long match on all variants 120 // OSR field encodes (osr-1); use raw bits to avoid a long match on all variants
121 let raw_osr = osr.saturating_sub(1) as u8; 121 let raw_osr = osr.saturating_sub(1);
122 unsafe { w.osr().bits(raw_osr).sbr().bits(sbr) } 122 unsafe { w.osr().bits(raw_osr).sbr().bits(sbr) }
123 }); 123 });
124 // 3) CTRL baseline and parity 124 // 3) CTRL baseline and parity
@@ -195,6 +195,12 @@ pub struct RingBuffer {
195 count: usize, 195 count: usize,
196} 196}
197 197
198impl Default for RingBuffer {
199 fn default() -> Self {
200 Self::new()
201 }
202}
203
198impl RingBuffer { 204impl RingBuffer {
199 pub const fn new() -> Self { 205 pub const fn new() -> Self {
200 Self { 206 Self {