From b04edfa05ebdf6d7471347507b3bb2a12cde79de Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Tue, 3 May 2022 10:53:16 +0900 Subject: [PATCH] Follow clippy --- plume-models/src/posts.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/plume-models/src/posts.rs b/plume-models/src/posts.rs index 9225fdc9..ef86ca97 100644 --- a/plume-models/src/posts.rs +++ b/plume-models/src/posts.rs @@ -884,18 +884,15 @@ impl FromId for PostUpdate { .content() .and_then(|content| content.to_as_string()), cover: None, - source: updated - .source() - .and_then(|s| { - serde_json::to_value(s).ok().and_then(|obj| { - if !obj.is_object() { - return None; - } - obj.get("content") - .and_then(|content| content.as_str().map(|c| c.to_string())) - }) + source: updated.source().and_then(|s| { + serde_json::to_value(s).ok().and_then(|obj| { + if !obj.is_object() { + return None; + } + obj.get("content") + .and_then(|content| content.as_str().map(|c| c.to_string())) }) - .map(|s| s.to_string()), + }), license: None, tags: updated .tag()