about summary refs log tree commit diff
path: root/src/libstd/task/spawn.rs
diff options
context:
space:
mode:
authorPhilipp Brüschweiler <blei42@gmail.com>2013-06-04 12:03:58 +0200
committerPhilipp Brüschweiler <blei42@gmail.com>2013-06-04 12:03:58 +0200
commit34ee63e93bd763326e676bd634f6f17a8f77791d (patch)
tree844bf025d2763daf4913cd7ae965803c20e0e2a3 /src/libstd/task/spawn.rs
parent133d45171564c8b7de14523c9f3aa87140b9f043 (diff)
downloadrust-34ee63e93bd763326e676bd634f6f17a8f77791d.tar.gz
rust-34ee63e93bd763326e676bd634f6f17a8f77791d.zip
std::cell: Modernize constructors
Part of #3853
Diffstat (limited to 'src/libstd/task/spawn.rs')
-rw-r--r--src/libstd/task/spawn.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/task/spawn.rs b/src/libstd/task/spawn.rs
index 35cf6de3a15..87e9296657f 100644
--- a/src/libstd/task/spawn.rs
+++ b/src/libstd/task/spawn.rs
@@ -594,7 +594,7 @@ fn spawn_raw_oldsched(mut opts: TaskOpts, f: ~fn()) {
         gen_child_taskgroup(opts.linked, opts.supervised);
 
     unsafe {
-        let child_data = Cell((child_tg, ancestors, f));
+        let child_data = Cell::new((child_tg, ancestors, f));
         // Being killed with the unsafe task/closure pointers would leak them.
         do unkillable {
             // Agh. Get move-mode items into the closure. FIXME (#2829)
@@ -636,7 +636,7 @@ fn spawn_raw_oldsched(mut opts: TaskOpts, f: ~fn()) {
                           notify_chan: Option<Chan<TaskResult>>,
                           f: ~fn())
                        -> ~fn() {
-        let child_data = Cell((child_arc, ancestors));
+        let child_data = Cell::new((child_arc, ancestors));
         let result: ~fn() = || {
             // Agh. Get move-mode items into the closure. FIXME (#2829)
             let mut (child_arc, ancestors) = child_data.take();