Skip to content

Commit 47ddaeb

Browse files
committed
Disable misguided clippy lint
1 parent 53a8b41 commit 47ddaeb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

embedded-hal-nb/src/serial.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ where
124124
{
125125
#[inline]
126126
fn write_str(&mut self, s: &str) -> core::fmt::Result {
127+
// The iteration has side-effects so using
128+
// `next_back()` instead of `last()` would be wrong
129+
#[allow(clippy::double_ended_iterator_last)]
127130
let _ = s
128131
.bytes()
129132
.map(|c| nb::block!(self.write(Word::from(c))))

0 commit comments

Comments
 (0)