File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 6432599c5d7f2646c0f91c6badef5496f2fbc119
2
+ refs/heads/master: 0755a30051c33c533ae2feb09924e561f7557143
Original file line number Diff line number Diff line change @@ -32,11 +32,11 @@ fn create[T]() -> t[T] {
32
32
33
33
fn fill[ T ] ( uint i, uint nelts, uint lo,
34
34
vec[ cell[ T ] ] old) -> cell[ T ] {
35
- if ( i < nelts) {
36
- ret old. ( ( lo + i) % nelts) ;
35
+ ret if ( i < nelts) {
36
+ old. ( ( lo + i) % nelts)
37
37
} else {
38
- ret option:: none[ T ] ;
39
- }
38
+ option:: none[ T ]
39
+ } ;
40
40
}
41
41
42
42
let uint nalloc = uint:: next_power_of_two ( nelts + 1 u) ;
@@ -45,11 +45,10 @@ fn create[T]() -> t[T] {
45
45
}
46
46
47
47
fn get[ T ] ( vec[ cell[ T ] ] elts, uint i) -> T {
48
- alt ( elts. ( i) ) {
49
- case ( option:: some[ T ] ( ?t) ) { ret t; }
50
- case ( _) { fail; }
51
- }
52
- fail; // FIXME: remove me when exhaustiveness checking works
48
+ ret alt ( elts. ( i) ) {
49
+ case ( option:: some[ T ] ( ?t) ) { t }
50
+ case ( _) { fail }
51
+ } ;
53
52
}
54
53
55
54
obj deque[ T ] ( mutable uint nelts,
You can’t perform that action at this time.
0 commit comments