File tree Expand file tree Collapse file tree 3 files changed +8
-17
lines changed Expand file tree Collapse file tree 3 files changed +8
-17
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
5
- refs/heads/try: df66e8d4a197443c214e918a858208ecc38e9f1c
5
+ refs/heads/try: 4c58903454f5409c4b0cb2060ce869021dbf46c2
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Version 0.6 (April 2013)
30
30
`@mut T`, `core::mut` or `core::cell`
31
31
* `extern mod { ... }` is no longer valid syntax for foreign
32
32
function modules. Use extern blocks: `extern { ... }`
33
- * Newtype enums removed. Used tuple-structs.
33
+ * Newtype enums removed. Use tuple-structs.
34
34
* Trait implementations no longer support visibility modifiers
35
35
* Pattern matching over vectors improved and expanded
36
36
* `const` renamed to `static` to correspond to lifetime name,
@@ -40,6 +40,10 @@ Version 0.6 (April 2013)
40
40
`#[deriving(Clone)]`
41
41
* Casts to traits must use a pointer sigil, e.g. `@foo as @Bar`
42
42
instead of `foo as Bar`.
43
+ * Fixed length vector types are now written as `[int, .. 3]`
44
+ instead of `[int * 3]`.
45
+ * Fixed length vector types can express the length as a constant
46
+ expression. (ex: `[int, .. GL_BUFFER_SIZE - 2]`)
43
47
44
48
* Semantic changes
45
49
* Types with owned pointers or custom destructors move by default,
Original file line number Diff line number Diff line change @@ -1865,10 +1865,8 @@ pub struct CharRange {
1865
1865
* Given a byte position and a str, return the previous char and its position
1866
1866
*
1867
1867
* This function can be used to iterate over a unicode string in reverse.
1868
- *
1869
- * returns 0 for next index if called on start index 0
1870
1868
*/
1871
- pub fn char_range_at_reverse ( ss : & str , start : uint ) -> CharRange {
1869
+ fn char_range_at_reverse ( ss : & str , start : uint ) -> CharRange {
1872
1870
let mut prev = start;
1873
1871
1874
1872
// while there is a previous byte == 10......
@@ -1877,12 +1875,7 @@ pub fn char_range_at_reverse(ss: &str, start: uint) -> CharRange {
1877
1875
}
1878
1876
1879
1877
// now refer to the initial byte of previous char
1880
- if prev > 0 u {
1881
- prev -= 1 u;
1882
- } else {
1883
- prev = 0 u;
1884
- }
1885
-
1878
+ prev -= 1 u;
1886
1879
1887
1880
let ch = char_at ( ss, prev) ;
1888
1881
return CharRange { ch : ch, next : prev} ;
@@ -3768,10 +3761,4 @@ mod tests {
3768
3761
" 12345555 ".cmp(& &" 123456 ") == Less;
3769
3762
" 22 ".cmp(& &" 1234 ") == Greater ;
3770
3763
}
3771
-
3772
- #[test]
3773
- fn test_char_range_at_reverse_underflow() {
3774
- assert!(char_range_at_reverse(" abc" , 0 ) . next == 0 ) ;
3775
- }
3776
-
3777
3764
}
You can’t perform that action at this time.
0 commit comments