File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: fd0750b218a16d1e340861579d237e5771804103
2
+ refs/heads/master: 75e46cc4d0fbd8f1a1c4676931119a858fafeacf
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ fn create[T]() -> t[T] {
47
47
ret _vec. init_fn [ cell[ T ] ] ( copy_op, nalloc) ;
48
48
}
49
49
50
- fn get[ T ] ( & vec[ cell[ T ] ] elts, uint i) -> T {
50
+ fn get[ T ] ( vec[ cell[ T ] ] elts, uint i) -> T {
51
51
alt ( elts. ( i) ) {
52
52
case ( util. some [ T ] ( t) ) { ret t; }
53
53
case ( _) { fail; }
@@ -100,6 +100,7 @@ fn create[T]() -> t[T] {
100
100
let T t = get[ T ] ( elts, lo) ;
101
101
elts. ( lo) = util. none [ T ] ( ) ;
102
102
lo = ( lo + 1 u) % _vec. len [ cell[ T ] ] ( elts) ;
103
+ nelts -= 1 u;
103
104
ret t;
104
105
}
105
106
@@ -112,6 +113,7 @@ fn create[T]() -> t[T] {
112
113
113
114
let T t = get[ T ] ( elts, hi) ;
114
115
elts. ( hi) = util. none [ T ] ( ) ;
116
+ nelts -= 1 u;
115
117
ret t;
116
118
}
117
119
You can’t perform that action at this time.
0 commit comments