Skip to content

Commit

Permalink
Cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
romancardenas committed Oct 17, 2022
1 parent f656193 commit a3c0965
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/stdout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ struct SerialWrapper(Tx<UART0>);
impl core::fmt::Write for SerialWrapper {
fn write_str(&mut self, s: &str) -> fmt::Result {
for byte in s.as_bytes() {
if *byte == '\n' as u8 {
let res = block!(self.0.write('\r' as u8));
if *byte == b'\n' {
let res = block!(self.0.write(b'\r'));

if res.is_err() {
return Err(::core::fmt::Error);
Expand Down Expand Up @@ -53,7 +53,7 @@ pub fn configure<X, Y>(
interrupt::free(|_| unsafe {
STDOUT.replace(SerialWrapper(tx));
});
return rx;
rx
}

/// Writes string to stdout
Expand Down

0 comments on commit a3c0965

Please sign in to comment.