From c5c79b784aae1ad36c273df1497ae243c11dd141 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 16 Feb 2024 18:37:19 +0100 Subject: [PATCH] tokio --- Cargo.toml | 3 ++- src/main.rs | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0714396..7b6e7a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "autocrate" -version = "0.1.0-prealpha.1" +version = "0.1.0-prealpha.2" edition = "2021" publish = true authors = ["Christoph J. Scherr "] @@ -30,6 +30,7 @@ serde = { version = "1.0.195", features = ["derive"] } serde_yaml = "0.9.30" tempfile = "3.9.0" thiserror = "1.0.56" +tokio = { version = "1.36.0", features = ["tokio-macros", "rt-multi-thread", "macros"] } url = { version = "2.5.0", features = ["serde"] } [[bin]] diff --git a/src/main.rs b/src/main.rs index 7e45f2b..aff9d4f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,14 +7,15 @@ use autocrate::{ error::*, }; -fn main() -> Result<()> { +#[tokio::main] +async fn main() -> Result<()> { let cli = Cli::cli_parse(); let cfg = Config::load(cli.clone())?; match cli.command { Commands::Changelog { .. } => { println!("{}", Changelog::build(&cfg)?.to_string()); - Ok(()) + // Ok(()) } Commands::Release { .. } => { todo!() @@ -22,5 +23,8 @@ fn main() -> Result<()> { Commands::Publish { .. } => { todo!() } - } + }; + + println!("foo"); + Ok(()) }