diff --git a/src/main.rs b/src/main.rs index 129784a..1029cac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,30 +1,24 @@ use color_eyre::Report; use reqwest::Client; -use tokio::time::sleep; -use std::time::Duration; use tracing::info; use tracing_subscriber::EnvFilter; -mod dumb; pub const URL_1: &str = "https://fasterthanli.me/articles/whats-in-the-box"; pub const URL_2: &str = "https://fasterthanli.me/series/advent-of-code-2020/part-13"; -fn type_name_of(_: &T) -> &'static str { - std::any::type_name::() -} - #[tokio::main] async fn main() -> Result<(), Report> { setup()?; - info!("Building that fetch future..."); + let client = Client::new(); - let fut = fetch_thing(&client, URL_1); - info!("Sleeping for a bit..."); - sleep(Duration::from_secs(1)).await; - info!("Awaiting that fetch future..."); - fut.await?; - info!("Done awaiting that fetch future"); + + let fut1 = fetch_thing(&client, URL_1); + let fut2 = fetch_thing(&client, URL_2); + + fut1.await?; + fut2.await?; + Ok(()) }