libstd: Make vec_from_set pure
This commit is contained in:
parent
82fd71137a
commit
1c3bfa4550
@ -382,7 +382,7 @@ pub fn set_add<K:Eq IterBytes Hash Const Copy>(set: Set<K>, key: K) -> bool {
|
||||
}
|
||||
|
||||
/// Convert a set into a vector.
|
||||
pub fn vec_from_set<T:Eq IterBytes Hash Copy>(s: Set<T>) -> ~[T] {
|
||||
pub pure fn vec_from_set<T:Eq IterBytes Hash Copy>(s: Set<T>) -> ~[T] {
|
||||
do vec::build_sized(s.size()) |push| {
|
||||
for s.each_key() |k| {
|
||||
push(k);
|
||||
|
Loading…
Reference in New Issue
Block a user