-
Idk if this is a bug, or improper documentation that led me here; but using this snippet from the Tokio Docs, I'm left with this error: For more context, this is my code: use std::sync::Arc;
use tokio::runtime::Runtime;
pub struct TokioRuntime {
pub runtime: Arc<Runtime>
}
impl TokioRuntime {
fn init() -> Self {
let rt = Runtime::new(); // <--- This line is pushing this error to the compiler.
Self { runtime: Arc::new(rt) }
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
sfackler
Aug 7, 2023
Replies: 1 comment 1 reply
-
Did you enable the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
2-3-5-41
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you enable the
rt-multi-thread
Cargo feature?