]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_errors/styled_buffer.rs
Simplify Cache wrapper to single type, impl Deref on it, fix all compilation errors...
[rust.git] / src / librustc_errors / styled_buffer.rs
index 6e03618d2b0b5f24b6d2296d5e9f60317284aaff..b12ab9e4576025c8efb7d17777df90fe7e94458b 100644 (file)
@@ -111,7 +111,7 @@ pub fn puts(&mut self, line: usize, col: usize, string: &str, style: Style) {
 
     pub fn prepend(&mut self, line: usize, string: &str, style: Style) {
         self.ensure_lines(line);
-        let string_len = string.len();
+        let string_len = string.chars().count();
 
         // Push the old content over to make room for new content
         for _ in 0..string_len {