diff options
| author | bors <bors@rust-lang.org> | 2014-09-12 08:05:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-09-12 08:05:42 +0000 |
| commit | 22e749ded10822a3063fa26800aaa3f229e97c4d (patch) | |
| tree | ea904ca9f23211f91e77a38dbce2a633fde5e41c /src/libcore | |
| parent | 805cf81b778f7b0d17a4afa3af93f975d5351307 (diff) | |
| parent | 5b3c3511c9f69c047a5eb804c91f984d83779c83 (diff) | |
auto merge of #17145 : ahmedcharles/rust/unicode, r=alexcrichton
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()) }) } |
