From d178e35c34a9106dd6c0a86286ff56dc8b297942 Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 17 May 2021 18:52:12 +0300 Subject: Make clippy happy --- src/micropub/post.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/micropub') diff --git a/src/micropub/post.rs b/src/micropub/post.rs index b3fe4ee..edadeed 100644 --- a/src/micropub/post.rs +++ b/src/micropub/post.rs @@ -346,19 +346,19 @@ async fn post_process_new_post( .filter_map(|v: surf::Url| async move { if let Ok(res) = http.get(&v).send().await { if res.status() != 200 { - return None; + None } else { - return Some((v, res)); + Some((v, res)) } } else { - return None; + None } }) .filter_map(|(v, mut res): (surf::Url, surf::Response)| async move { if let Ok(body) = res.body_string().await { - return Some((v, body)); + Some((v, body)) } else { - return None; + None } }) .collect() @@ -373,7 +373,7 @@ async fn post_process_new_post( if let Some(syndication_targets) = post["properties"]["syndicate-to"].as_array() { syndicated_copies = stream::iter( syndication_targets - .into_iter() + .iter() .filter_map(|v| v.as_str()) .filter_map(|t| surf::Url::parse(t).ok()) .collect::>() -- cgit 1.4.1