Fix code according to clippy

This commit is contained in:
Kitaiti Makoto
2021-03-28 03:46:37 +09:00
parent 9ed36b2aa3
commit 8e50d95a7a
8 changed files with 12 additions and 26 deletions
+1 -4
View File
@@ -486,10 +486,7 @@ impl User {
.filter_map(|j| serde_json::from_value(j.clone()).ok())
.collect::<Vec<T>>();
let next = match json.get("next") {
Some(x) => Some(x.as_str().unwrap().to_owned()),
None => None,
};
let next = json.get("next").map(|x| x.as_str().unwrap().to_owned());
Ok((items, next))
}
pub fn fetch_outbox<T: Activity>(&self) -> Result<Vec<T>> {