From 079049cfac5896a9a78dd14b17a74c9479a3c96c Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 26 Jun 2015 22:45:32 +0200 Subject: [PATCH] Stop using the deprecated Thunk API. --- components/util/lib.rs | 1 - components/util/taskpool.rs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/util/lib.rs b/components/util/lib.rs index 4d7cfeec6d6..8dcd3d6cad0 100644 --- a/components/util/lib.rs +++ b/components/util/lib.rs @@ -16,7 +16,6 @@ #![feature(slice_extras)] #![feature(step_by)] #![feature(step_trait)] -#![feature(thunk)] #![feature(zero_one)] #![plugin(string_cache_plugin)] diff --git a/components/util/taskpool.rs b/components/util/taskpool.rs index 064b2c9c07e..bbd9ce8f311 100644 --- a/components/util/taskpool.rs +++ b/components/util/taskpool.rs @@ -16,12 +16,12 @@ // use task::spawn_named; +use std::boxed::FnBox; use std::sync::{Arc, Mutex}; use std::sync::mpsc::{channel, Sender, Receiver}; -use std::thunk::Thunk; pub struct TaskPool { - tx: Sender>, + tx: Sender>, } impl TaskPool { @@ -40,7 +40,7 @@ impl TaskPool { return TaskPool { tx: tx }; - fn worker(rx: &Mutex>>) { + fn worker(rx: &Mutex>>) { loop { let job = rx.lock().unwrap().recv(); match job {