This commit is contained in:
Brian Anderson 2012-12-05 20:14:33 -08:00
parent 784c1af8fd
commit 32ce61f947

View file

@ -11,7 +11,7 @@ fn iter<T>(v: ~[T], it: fn(T) -> bool) {
}
}
fn find_pos<T:Eq>(n: T, h: ~[T]) -> Option<uint> {
fn find_pos<T:Eq Copy>(n: T, h: ~[T]) -> Option<uint> {
let mut i = 0u;
for iter(copy h) |e| {
if e == n { return Some(i); }