File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
branches/snap-stage3/src/libcore Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 33f4a9838887f03cf5c76e5b470efecaff233636
4
+ refs/heads/snap-stage3: e127bf680f8a133f339901e05a44ac20b5faed3e
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -1066,15 +1066,15 @@ Safety note:
1066
1066
FIXME: rename to 'substr_len_chars'
1067
1067
*/
1068
1068
fn char_len_range ( s : str , byte_start : uint , byte_len : uint ) -> uint {
1069
- let i = byte_start;
1069
+ let i = byte_start;
1070
+ let byte_stop = i + byte_len;
1070
1071
let len = 0 u;
1071
- while i < byte_len {
1072
+ while i < byte_stop {
1072
1073
let chsize = utf8_char_width ( s[ i] ) ;
1073
1074
assert ( chsize > 0 u) ;
1074
1075
len += 1 u;
1075
1076
i += chsize;
1076
1077
}
1077
- assert ( i == byte_len) ;
1078
1078
ret len;
1079
1079
}
1080
1080
You can’t perform that action at this time.
0 commit comments