diff --git a/src/main.rs b/src/main.rs index 3933ff4..358527a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,7 @@ struct Args { count: u8, } +#[tokio::main] fn main() { let args = Args::parse(); @@ -34,13 +35,12 @@ fn main() { } } } -#[tokio::main] + async fn get_req(url: &str) -> Result { let body = reqwest::get(url).await?.text().await?; Ok(body) } -#[tokio::main] async fn get_post(url: &str, json: String) { let spl: Vec<&str> = json.split(":").collect(); let json_data = format!(r#"{{"{}": "{}"}}"#, spl[0], spl[1]);