From e56753c6774d15ee231129242abc3346cc2984fc Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 28 May 2018 00:20:10 +0200 Subject: [PATCH] make draw_string accept string slices instead of char slices --- src/drawing/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drawing/mod.rs b/src/drawing/mod.rs index 8c56679..9cff1d6 100644 --- a/src/drawing/mod.rs +++ b/src/drawing/mod.rs @@ -151,9 +151,9 @@ impl Graphics { ///TODO: implement! /// no autobreak line yet - pub fn draw_string(&self, buffer: &mut[u8], x0: u16, y0: u16, input: &[char], color: &Color) { + pub fn draw_string(&self, buffer: &mut[u8], x0: u16, y0: u16, input: &str, color: &Color) { let mut counter = 0; - for &input_char in input.iter() { + for input_char in input.chars() { self.draw_char(buffer, x0 + counter, y0, input_char, color); counter += 1; }