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:
Pierre Chevalier 2023-02-23 09:48:42 -08:00 committed by Facebook GitHub Bot
parent 3e12d0d788
commit 2a4d191a78

View File

@ -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));
}
});
});
}));
}
}