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 cc3002c + f2687e9 commit 2d370d2Copy full SHA for 2d370d2
src/rpc/pd/leader.rs
@@ -119,12 +119,11 @@ impl PdReactor {
119
let mut core = Core::new().unwrap();
120
let handle = core.handle();
121
{
122
- 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| {
123
Self::dispatch(&client, t.unwrap(), &handle);
124
ready(())
125
});
126
- core.run(TryFutureExt::compat(f.into_future().unit_error()))
127
- .unwrap();
+ core.run(TryFutureExt::compat(f.unit_error())).unwrap();
128
}
129
130
0 commit comments