From 9fb5d188a7124b60673d50f394ccfbff0de37443 Mon Sep 17 00:00:00 2001 From: LordMZTE Date: Sat, 5 Dec 2020 22:21:00 +0100 Subject: [PATCH] format --- cli/src/commands/list.rs | 4 ++-- cli/src/commands/mod.rs | 2 +- cli/src/util.rs | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cli/src/commands/list.rs b/cli/src/commands/list.rs index 25bbe6d..8bdb30b 100644 --- a/cli/src/commands/list.rs +++ b/cli/src/commands/list.rs @@ -1,5 +1,5 @@ -use reqwest::Client; use anyhow::Result; +use reqwest::Client; use crate::util; @@ -14,4 +14,4 @@ pub async fn run(http: &Client) -> Result<()> { println!("{}", table.render()); Ok(()) -} \ No newline at end of file +} diff --git a/cli/src/commands/mod.rs b/cli/src/commands/mod.rs index b0018cb..de6f49e 100644 --- a/cli/src/commands/mod.rs +++ b/cli/src/commands/mod.rs @@ -1,3 +1,3 @@ +pub mod list; pub mod search; pub mod up; -pub mod list; diff --git a/cli/src/util.rs b/cli/src/util.rs index cc401ca..0c4cf71 100644 --- a/cli/src/util.rs +++ b/cli/src/util.rs @@ -1,4 +1,5 @@ - use std::unreachable; + +use std::unreachable; use anyhow::Result; use once_cell::sync::OnceCell; @@ -39,8 +40,10 @@ pub async fn cats(http: &Client) -> Result<&Vec> { pub async fn memes(http: &Client) -> Result<&Vec> { if MEMES.get().is_none() { - let res = http.get("https://data.tilera.xyz/api/jensmemes/memes") - .send().await?; + let res = http + .get("https://data.tilera.xyz/api/jensmemes/memes") + .send() + .await?; let memes = serde_json::from_slice::(&res.bytes().await?)?; Ok(MEMES.get_or_init(|| memes.memes))