From 33d27d9efa5547958a9a671757d300bdce50661c Mon Sep 17 00:00:00 2001 From: Stephen Marz Date: Sat, 5 Oct 2019 00:18:24 -0400 Subject: [PATCH] Use byte iterator --- risc_v/ch2/src/uart.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/risc_v/ch2/src/uart.rs b/risc_v/ch2/src/uart.rs index e99e8ba..4065d07 100755 --- a/risc_v/ch2/src/uart.rs +++ b/risc_v/ch2/src/uart.rs @@ -11,8 +11,8 @@ pub struct Uart { impl Write for Uart { fn write_str(&mut self, out: &str) -> Result<(), Error> { - for c in out.as_bytes() { - self.put(*c); + for c in out.bytes() { + self.put(c); } Ok(()) }