about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-04-09 11:43:33 +1000
committerAlex Crichton <alex@alexcrichton.com>2014-04-10 15:21:58 -0700
commita65411e4f7b5df78e34dcaf8061d4641f4b56412 (patch)
tree3215d5cac2cd39ada18f21d8746dc95765d71b02 /src/libstd/rt
parent342e8b59be97c28be38d54bec10e511ae17da129 (diff)
downloadrust-a65411e4f7b5df78e34dcaf8061d4641f4b56412.tar.gz
rust-a65411e4f7b5df78e34dcaf8061d4641f4b56412.zip
std,serialize: remove some internal uses of ~[].
These are all private uses of ~[], so can easily & non-controversially
be replaced with Vec.
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/at_exit_imp.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/rt/at_exit_imp.rs b/src/libstd/rt/at_exit_imp.rs
index 4be9c8a84ac..67b8b40b47e 100644
--- a/src/libstd/rt/at_exit_imp.rs
+++ b/src/libstd/rt/at_exit_imp.rs
@@ -20,8 +20,9 @@ use option::{Some, None};
 use ptr::RawPtr;
 use unstable::sync::Exclusive;
 use slice::OwnedVector;
+use vec::Vec;
 
-type Queue = Exclusive<~[proc():Send]>;
+type Queue = Exclusive<Vec<proc():Send>>;
 
 // You'll note that these variables are *not* atomic, and this is done on
 // purpose. This module is designed to have init() called *once* in a
@@ -35,7 +36,7 @@ pub fn init() {
     unsafe {
         rtassert!(!RUNNING);
         rtassert!(QUEUE.is_null());
-        let state: ~Queue = ~Exclusive::new(~[]);
+        let state: ~Queue = ~Exclusive::new(vec!());
         QUEUE = cast::transmute(state);
     }
 }
@@ -61,7 +62,7 @@ pub fn run() {
         QUEUE = 0 as *mut Queue;
         let mut vec = None;
         state.with(|arr| {
-            vec = Some(mem::replace(arr, ~[]));
+            vec = Some(mem::replace(arr, vec!()));
         });
         vec.take_unwrap()
     };