mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove a pointless closure from spawn_named.
This commit is contained in:
parent
cfc80582c8
commit
4297a44435
1 changed files with 1 additions and 3 deletions
|
@ -12,9 +12,7 @@ pub fn spawn_named<F>(name: String, f: F)
|
||||||
where F: FnOnce() + Send + 'static
|
where F: FnOnce() + Send + 'static
|
||||||
{
|
{
|
||||||
let builder = thread::Builder::new().name(name);
|
let builder = thread::Builder::new().name(name);
|
||||||
builder.spawn(move || {
|
builder.spawn(f).unwrap();
|
||||||
f()
|
|
||||||
}).unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Arrange to send a particular message to a channel if the task fails.
|
/// Arrange to send a particular message to a channel if the task fails.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue