mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2025-02-16 23:15:14 +00:00
Follow clippy
This commit is contained in:
parent
1f62bf27f8
commit
b04edfa05e
1 changed files with 8 additions and 11 deletions
|
@ -884,18 +884,15 @@ impl FromId<DbConn> for PostUpdate {
|
||||||
.content()
|
.content()
|
||||||
.and_then(|content| content.to_as_string()),
|
.and_then(|content| content.to_as_string()),
|
||||||
cover: None,
|
cover: None,
|
||||||
source: updated
|
source: updated.source().and_then(|s| {
|
||||||
.source()
|
serde_json::to_value(s).ok().and_then(|obj| {
|
||||||
.and_then(|s| {
|
if !obj.is_object() {
|
||||||
serde_json::to_value(s).ok().and_then(|obj| {
|
return None;
|
||||||
if !obj.is_object() {
|
}
|
||||||
return None;
|
obj.get("content")
|
||||||
}
|
.and_then(|content| content.as_str().map(|c| c.to_string()))
|
||||||
obj.get("content")
|
|
||||||
.and_then(|content| content.as_str().map(|c| c.to_string()))
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
.map(|s| s.to_string()),
|
}),
|
||||||
license: None,
|
license: None,
|
||||||
tags: updated
|
tags: updated
|
||||||
.tag()
|
.tag()
|
||||||
|
|
Loading…
Reference in a new issue