Skip to content

Commit 94eb52a

Browse files
committed
Eliminate FnBox following rust-lang/rust#55431
1 parent 1154b60 commit 94eb52a

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

noria-server/src/controller/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub(super) fn main<A: Authority + 'static>(
136136
if let Some(ref mut ctrl) = controller {
137137
if !ctrl.workers.is_empty() {
138138
crate::block_on(|| {
139-
ctrl.migrate(move |m| f.call_box((m,)));
139+
ctrl.migrate(move |m| f(m));
140140
done.send(()).unwrap();
141141
});
142142
}

noria-server/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@
354354
#![feature(box_syntax)]
355355
#![feature(nll)]
356356
#![feature(try_blocks)]
357-
#![feature(fnbox)]
358357
#![feature(vec_remove_item)]
359358
#![feature(crate_visibility_modifier)]
360359
#![deny(missing_docs)]

noria-server/src/startup.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use noria::consensus::Authority;
88
use noria::ControllerDescriptor;
99
use rand;
1010
use slog;
11-
use std::boxed::FnBox;
1211
use std::io;
1312
use std::net::{IpAddr, SocketAddr};
1413
use std::sync::Arc;
@@ -38,7 +37,7 @@ crate enum Event {
3837
#[cfg(test)]
3938
IsReady(futures::sync::oneshot::Sender<bool>),
4039
ManualMigration {
41-
f: Box<FnBox(&mut crate::controller::migrate::Migration) + Send + 'static>,
40+
f: Box<FnOnce(&mut crate::controller::migrate::Migration) + Send + 'static>,
4241
done: futures::sync::oneshot::Sender<()>,
4342
},
4443
}

0 commit comments

Comments
 (0)