Made Ticker::next Send+Sync.

This commit is contained in:
Frostie314159
2024-03-31 15:07:01 +02:00
parent 2d2bd679ee
commit a2f9aa592e

View File

@@ -185,7 +185,7 @@ impl Ticker {
}
/// Waits for the next tick.
pub fn next(&mut self) -> impl Future<Output = ()> + '_ {
pub fn next(&mut self) -> impl Future<Output = ()> + Send + Sync + '_ {
poll_fn(|cx| {
if self.expires_at <= Instant::now() {
let dur = self.duration;