libstd: Make vec_from_set pure

This commit is contained in:
Patrick Walton 2012-10-03 19:25:24 -07:00
parent 82fd71137a
commit 1c3bfa4550

View File

@ -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);