mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
Fix clippy lint
Summary: clippy complains with ``` non-binding `let` on a future consider awaiting the future or dropping explicitly with `std::mem::drop` for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future `#[warn(clippy::let_underscore_future)]` on by default ``` Because the future we are not awaiting comes from `tokio::spawn`, it is still executing. Use `std::mem::drop` to make the intent of ignoring the handle explicit while satisfying clippy. Reviewed By: yancouto Differential Revision: D43468794 fbshipit-source-id: 9da8fe940e00c3043fdfba7d25c8add94ca6818e
This commit is contained in:
parent
3e12d0d788
commit
2a4d191a78
@ -819,7 +819,9 @@ impl BookmarksCoordinator {
|
||||
self.live_updaters,
|
||||
self.warmers,
|
||||
);
|
||||
let _ = tokio::spawn(async move {
|
||||
// By dropping the future output by tokio::spawn instead of awaiting it, we
|
||||
// delegate the responsibility of managing it to tokio's async queue
|
||||
std::mem::drop(tokio::spawn(async move {
|
||||
let res = single_bookmark_updater(
|
||||
&ctx,
|
||||
&repo,
|
||||
@ -849,7 +851,7 @@ impl BookmarksCoordinator {
|
||||
live_updaters.insert(book.key().clone(), state.into_finished(&res));
|
||||
}
|
||||
});
|
||||
});
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user