diff options
Diffstat (limited to 'src/libstd/unstable/extfmt.rs')
| -rw-r--r-- | src/libstd/unstable/extfmt.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libstd/unstable/extfmt.rs b/src/libstd/unstable/extfmt.rs index 5417af50081..a08851df626 100644 --- a/src/libstd/unstable/extfmt.rs +++ b/src/libstd/unstable/extfmt.rs @@ -549,12 +549,14 @@ pub mod rt { // For strings, precision is the maximum characters // displayed let unpadded = match cv.precision { - CountImplied => s, - CountIs(max) => if (max as uint) < s.char_len() { - s.slice(0, max as uint) - } else { - s - } + CountImplied => s, + CountIs(max) => { + if (max as uint) < s.char_len() { + s.slice(0, max as uint) + } else { + s + } + } }; pad(cv, unpadded, None, PadNozero, buf); } |
