]> git.lizzy.rs Git - rust.git/commitdiff
Remove DVec from workcache
authorSeo Sanghyeon <sanxiyn@gmail.com>
Thu, 14 Feb 2013 14:12:12 +0000 (23:12 +0900)
committerSeo Sanghyeon <sanxiyn@gmail.com>
Thu, 14 Feb 2013 14:12:12 +0000 (23:12 +0900)
src/libstd/workcache.rs

index d78761b70e3ef3d851e37779e8e4b6e0fe02290a..c06f2f867bce11a56f335f7ecf46c6bc36b11e9b 100644 (file)
@@ -16,7 +16,6 @@
 use sort;
 
 use core::cmp;
-use core::dvec;
 use core::either::{Either, Left, Right};
 use core::io;
 use core::option;
@@ -141,13 +140,12 @@ impl WorkKey {
 
 pub impl<S: Encoder> WorkMap: Encodable<S> {
     fn encode(&self, s: &S) {
-        let d = dvec::DVec();
+        let mut d = ~[];
         for self.each |&(k, v)| {
             d.push((copy *k, copy *v))
         }
-        let mut v = d.get();
-        sort::tim_sort(v);
-        v.encode(s)
+        sort::tim_sort(d);
+        d.encode(s)
     }
 }