Skip to content

Commit a3c0965

Browse files
committed
Cargo clippy
1 parent f656193 commit a3c0965

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/stdout.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ struct SerialWrapper(Tx<UART0>);
1919
impl core::fmt::Write for SerialWrapper {
2020
fn write_str(&mut self, s: &str) -> fmt::Result {
2121
for byte in s.as_bytes() {
22-
if *byte == '\n' as u8 {
23-
let res = block!(self.0.write('\r' as u8));
22+
if *byte == b'\n' {
23+
let res = block!(self.0.write(b'\r'));
2424

2525
if res.is_err() {
2626
return Err(::core::fmt::Error);
@@ -53,7 +53,7 @@ pub fn configure<X, Y>(
5353
interrupt::free(|_| unsafe {
5454
STDOUT.replace(SerialWrapper(tx));
5555
});
56-
return rx;
56+
rx
5757
}
5858

5959
/// Writes string to stdout

0 commit comments

Comments
 (0)