diff --git a/src/main.rs b/src/main.rs index 1804925..c2fb658 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,4 @@ -use serde::{Deserialize}; - +use serde::Deserialize; #[derive(Deserialize)] struct Ip { @@ -8,10 +7,9 @@ struct Ip { #[tokio::main] async fn main() -> Result<(), Box> { - let resp = reqwest::get("https://api.ipify.org?format=json") - .await?; + let resp = reqwest::get("https://api.ipify.org?format=json").await?; let body = resp.text().await?; let ip: Ip = serde_json::from_str(&body)?; - println!("My IP {}", ip.ip); + println!("{}", ip.ip); Ok(()) }