Remove a pointless closure from spawn_named.

This commit is contained in:
Ms2ger 2015-10-23 10:35:58 +02:00
parent cfc80582c8
commit 4297a44435

View file

@ -12,9 +12,7 @@ pub fn spawn_named<F>(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.