From 0bd78e07e3a285851834fe6fca8f78a492645dfe Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 10 Mar 2024 16:47:00 +0000 Subject: [PATCH] add async_std::main annotation to main --- 1--transforming-sync-to-async/provided-code/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/1--transforming-sync-to-async/provided-code/src/main.rs b/1--transforming-sync-to-async/provided-code/src/main.rs index fead33d..eda7d33 100644 --- a/1--transforming-sync-to-async/provided-code/src/main.rs +++ b/1--transforming-sync-to-async/provided-code/src/main.rs @@ -118,7 +118,8 @@ fn fetch_closing_data( } } -fn main() -> std::io::Result<()> { +#[async_std::main] +async fn main() -> std::io::Result<()> { let opts = Opts::parse(); let from: DateTime = opts.from.parse().expect("Couldn't parse 'from' date"); let to = Utc::now();