change unreachable{} to @unreachable()
instead of a container init expression, it's a builtin function call.
This commit is contained in:
@@ -55,7 +55,7 @@ pub struct SmallHashMap(K: type, V: type, hash: fn(key: K)->u32, eql: fn(a: K, b
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
unreachable{} // no next item
|
||||
@unreachable() // no next item
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,9 +137,9 @@ pub struct SmallHashMap(K: type, V: type, hash: fn(key: K)->u32, eql: fn(a: K, b
|
||||
entry.distance_from_start_index -= 1;
|
||||
entry = next_entry;
|
||||
}
|
||||
unreachable{} // shifting everything in the table
|
||||
@unreachable() // shifting everything in the table
|
||||
}}
|
||||
unreachable{} // key not found
|
||||
@unreachable() // key not found
|
||||
}
|
||||
|
||||
pub fn entryIterator(hm: &Self) -> Iterator {
|
||||
@@ -210,7 +210,7 @@ pub struct SmallHashMap(K: type, V: type, hash: fn(key: K)->u32, eql: fn(a: K, b
|
||||
};
|
||||
return;
|
||||
}
|
||||
unreachable{} // put into a full map
|
||||
@unreachable() // put into a full map
|
||||
}
|
||||
|
||||
fn internalGet(hm: &Self, key: K) -> ?&Entry {
|
||||
|
||||
Reference in New Issue
Block a user