From ef924ebb9005d19321bc3336ec9894f0878d9aaf Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 6 Jun 2021 15:57:29 +0200 Subject: Explicitly use tokio's multi-threaded runtime Rather that relying on the Cargo features we've enabled to define this, create a multi-threaded runtime in code. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index a151217..20587d5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,7 +64,7 @@ fn run() -> anyhow::Result<()> { let base_cgitrc = opt_matches.opt_str("cgitrc") .map(|s| PathBuf::from(s)); - let rt = tokio::runtime::Runtime::new()?; + let rt = tokio::runtime::Builder::new_multi_thread().build()?; let _rt_guard = rt.enter(); // let repos = github::fetch_repos(username).await? -- cgit v1.2.3