Fix some map related build failures.
This commit is contained in:
parent
7fe1005fd1
commit
98d0aae9a1
@ -733,10 +733,7 @@ fn hash(u: &uint) -> uint {
|
||||
i = 0u;
|
||||
while i < num_to_insert {
|
||||
let v = hm.remove(i);
|
||||
match v {
|
||||
option::some(u) => assert (u == i * i),
|
||||
option::none => fail
|
||||
}
|
||||
assert v;
|
||||
i += 2u;
|
||||
}
|
||||
assert (hm.size() == num_to_insert / 2u);
|
||||
|
@ -59,12 +59,12 @@ fn find(+k:int) -> option<T> { if k <= self.meows {
|
||||
else { none }
|
||||
}
|
||||
|
||||
fn remove(+k:int) -> option<T> {
|
||||
fn remove(+k:int) -> bool {
|
||||
match self.find(k) {
|
||||
some(x) => {
|
||||
self.meows -= k; some(x)
|
||||
self.meows -= k; true
|
||||
}
|
||||
none => { none }
|
||||
none => { false }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user