use crate::Executor; use futures::Future; /// A `smol` runtime. #[cfg_attr(docsrs, doc(cfg(feature = "smol")))] #[derive(Debug)] pub struct Smol; impl Executor for Smol { fn new() -> Result { Ok(Self) } fn spawn(&self, future: impl Future + Send + 'static) { smol::spawn(future).detach(); } }