summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-04-23 14:23:57 +0300
committerLars Wirzenius <liw@liw.fi>2021-04-23 14:23:57 +0300
commitd15605adea20a93214b678d30e73ca7bcbf1bc1b (patch)
treea52dafb8a49543145145ecb8fdd91d7c029d2df8
parentca61af01ed867e695ceb19b6975354743d6ab14a (diff)
downloadsummain-rs-d15605adea20a93214b678d30e73ca7bcbf1bc1b.tar.gz
use tokio::main
-rw-r--r--src/bin/summain.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/bin/summain.rs b/src/bin/summain.rs
index 2ad110b..6344298 100644
--- a/src/bin/summain.rs
+++ b/src/bin/summain.rs
@@ -3,16 +3,8 @@ use std::path::PathBuf;
use structopt::StructOpt;
use summain::ManifestEntry;
-fn main() -> anyhow::Result<()> {
- let runtime = tokio::runtime::Builder::new_multi_thread()
- .worker_threads(num_cpus::get())
- .max_blocking_threads(num_cpus::get())
- .build()?;
- runtime.block_on(async { async_main().await })?;
- Ok(())
-}
-
-async fn async_main() -> anyhow::Result<()> {
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
let mut opt = Opt::from_args();
opt.pathnames[..].sort();