pub struct alist<A,B> {
eq_fn: extern "Rust" fn(A,A) -> bool,
- data: @RefCell<~[Entry<A,B>]>,
+ data: @RefCell<Vec<Entry<A,B>> >,
}
pub fn alist_add<A:'static,B:'static>(lst: &alist<A,B>, k: A, v: B) {
fn eq_int(a: int, b: int) -> bool { a == b }
return alist {
eq_fn: eq_int,
- data: @RefCell::new(~[]),
+ data: @RefCell::new(Vec::new()),
};
}
fn eq_int(a: int, b: int) -> bool { a == b }
return alist {
eq_fn: eq_int,
- data: @RefCell::new(~[]),
+ data: @RefCell::new(Vec::new()),
};
}