We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a60cfdb commit b2da76dCopy full SHA for b2da76d
src/main.rs
@@ -8,8 +8,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
8
.await?
9
.json::<HashMap<String, String>>()
10
.await?;
11
+ let img_url = &resp["image"];
12
- let img_bytes = reqwest::get(&resp["image"]).await?.bytes().await?;
13
+ let img_bytes = reqwest::get(img_url).await?.bytes().await?;
14
let img = load_from_memory(&img_bytes)?;
15
16
let conf = Config {
@@ -18,5 +19,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
18
19
};
20
print(&img, &conf)?;
21
22
+ println!("{}", img_url);
23
+
24
Ok(())
25
}
0 commit comments