Skip to content

Commit 5098c41

Browse files
committed
Small code simplification
1 parent ffeca6b commit 5098c41

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/fmt.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ where
99
{
1010
fn write_str(&mut self, s: &str) -> Result {
1111
let _ = s
12-
.as_bytes()
13-
.into_iter()
14-
.map(|c| nb::block!(self.write(Word::from(*c))))
12+
.bytes()
13+
.map(|c| nb::block!(self.write(Word::from(c))))
1514
.last();
1615
Ok(())
1716
}

0 commit comments

Comments
 (0)