make draw_string accept string slices instead of char slices

embedded-hal-1.0
Chris 2018-05-28 00:20:10 +02:00
parent 869866d997
commit e56753c677
1 changed files with 2 additions and 2 deletions

View File

@ -151,9 +151,9 @@ impl Graphics {
///TODO: implement! ///TODO: implement!
/// no autobreak line yet /// 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; 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); self.draw_char(buffer, x0 + counter, y0, input_char, color);
counter += 1; counter += 1;
} }