diff options
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/fmt/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index be75bfec32c..3244a72897f 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -476,7 +476,7 @@ impl<'a> Formatter<'a> { let mut prefixed = false; if self.flags & (1 << (FlagAlternate as uint)) != 0 { - prefixed = true; width += prefix.len(); + prefixed = true; width += prefix.char_len(); } // Writes the sign if it exists, and then the prefix if it was requested @@ -562,7 +562,7 @@ impl<'a> Formatter<'a> { // If we're under both the maximum and the minimum width, then fill // up the minimum width with the specified string + some alignment. Some(width) => { - self.with_padding(width - s.len(), rt::AlignLeft, |me| { + self.with_padding(width - s.char_len(), rt::AlignLeft, |me| { me.buf.write(s.as_bytes()) }) } |
