From 357a538e8d5f69c8c0aeacfd416f1ad99b0907d3 Mon Sep 17 00:00:00 2001 From: James Munns Date: Thu, 13 Nov 2025 17:50:11 +0100 Subject: autofix clippy lints --- src/uart.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/uart.rs') 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 Uart { StopBits::Two => w.sbns().two(), }; // OSR field encodes (osr-1); use raw bits to avoid a long match on all variants - let raw_osr = osr.saturating_sub(1) as u8; + let raw_osr = osr.saturating_sub(1); unsafe { w.osr().bits(raw_osr).sbr().bits(sbr) } }); // 3) CTRL baseline and parity @@ -195,6 +195,12 @@ pub struct RingBuffer { count: usize, } +impl Default for RingBuffer { + fn default() -> Self { + Self::new() + } +} + impl RingBuffer { pub const fn new() -> Self { Self { -- cgit From 306e55819656eeb41c69f2d5625c46419f0534c4 Mon Sep 17 00:00:00 2001 From: James Munns Date: Thu, 13 Nov 2025 18:02:24 +0100 Subject: Manually fix clippy lints --- src/uart.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/uart.rs') diff --git a/src/uart.rs b/src/uart.rs index cd504a6c6..3705959d3 100644 --- a/src/uart.rs +++ b/src/uart.rs @@ -1,6 +1,10 @@ //! Minimal polling UART2 bring-up replicating MCUXpresso hello_world ordering. //! WARNING: This is a narrow implementation only for debug console (115200 8N1). +// TODO(AJM): As of 2025-11-13, we need to do a pass to ensure safety docs +// are complete prior to release. +#![allow(clippy::missing_safety_doc)] + use core::cell::RefCell; use cortex_m::interrupt::Mutex; -- cgit