Skip to content

Commit f5f1b7d

Browse files
committed
---
yaml --- r: 11102 b: refs/heads/master c: 0c13ee2 h: refs/heads/master v: v3
1 parent 6612f45 commit f5f1b7d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 1aa23947a630fbc5678eeabeca5a653a37871bdd
2+
refs/heads/master: 0c13ee22ade792f3662641a4ab8470ecfe33c236
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/libcore/extfmt.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,12 @@ mod rt {
321321
// For strings, precision is the maximum characters
322322
// displayed
323323

324-
// FIXME: substr works on bytes, not chars!
325324
let unpadded =
326325
alt cv.precision {
327326
count_implied { s }
328327
count_is(max) {
329328
if max as uint < str::char_len(s) {
330-
str::unsafe::slice_bytes(s, 0u, max as uint)
329+
str::substr(s, 0u, max as uint)
331330
} else { s }
332331
}
333332
};

0 commit comments

Comments
 (0)