We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 89b1242 + 72a3605 commit f2687e9Copy full SHA for f2687e9
src/rpc/pd/leader.rs
@@ -120,12 +120,11 @@ impl PdReactor {
120
let mut core = Core::new().unwrap();
121
let handle = core.handle();
122
{
123
- let f = rx.take_while(|t| ready(t.is_some())).then(|t| {
+ let f = rx.take_while(|t| ready(t.is_some())).for_each(|t| {
124
Self::dispatch(&client, t.unwrap(), &handle);
125
ready(())
126
});
127
- core.run(TryFutureExt::compat(f.into_future().unit_error()))
128
- .unwrap();
+ core.run(TryFutureExt::compat(f.unit_error())).unwrap();
129
}
130
131
0 commit comments