use std::{future::Future, pin::Pin};
use sync_wrapper::SyncFuture;
pub trait FutureSyncExt: Future + Sized {
fn make_sync(self) -> SyncFuture<Self> {
SyncFuture::new(self)
}
fn boxed_sync(self) -> Pin<Box<SyncFuture<Self>>> {
Box::pin(self.make_sync())
}
}
impl<F: Future> FutureSyncExt for F {}