mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2024-06-02 13:29:36 +00:00
clippy
This commit is contained in:
parent
42dbc6375b
commit
18e943b1ea
|
@ -49,13 +49,13 @@ where
|
||||||
<ActorT as Object>::Error: From<Error>,
|
<ActorT as Object>::Error: From<Error>,
|
||||||
Datatype: Clone,
|
Datatype: Clone,
|
||||||
{
|
{
|
||||||
let activity: Activity = serde_json::from_slice(&body).map_err(|e| {
|
let activity: Activity = serde_json::from_slice(body).map_err(|e| {
|
||||||
// Attempt to parse only activity id for error message
|
// Attempt to parse only activity id for error message
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
struct Id {
|
struct Id {
|
||||||
id: Url,
|
id: Url,
|
||||||
}
|
}
|
||||||
match serde_json::from_slice::<Id>(&body) {
|
match serde_json::from_slice::<Id>(body) {
|
||||||
Ok(id) => Error::ParseReceivedActivity(id.id, e),
|
Ok(id) => Error::ParseReceivedActivity(id.id, e),
|
||||||
Err(e) => Error::Json(e),
|
Err(e) => Error::Json(e),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue