From 4297a4443538ee2638111b0c59afa5c7f6fb8830 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 23 Oct 2015 10:35:58 +0200 Subject: [PATCH] Remove a pointless closure from spawn_named. --- components/util/task.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/util/task.rs b/components/util/task.rs index 0da712f5d06..2495bb8acd5 100644 --- a/components/util/task.rs +++ b/components/util/task.rs @@ -12,9 +12,7 @@ pub fn spawn_named(name: String, f: F) where F: FnOnce() + Send + 'static { let builder = thread::Builder::new().name(name); - builder.spawn(move || { - f() - }).unwrap(); + builder.spawn(f).unwrap(); } /// Arrange to send a particular message to a channel if the task fails.