diff --git a/src/endpoint.rs b/src/endpoint.rs index 664834a..c0b2b00 100644 --- a/src/endpoint.rs +++ b/src/endpoint.rs @@ -109,7 +109,7 @@ impl<'a> Endpoint<'a> { private_key: &PrivateKey, ) -> Result { let remote_actor: Actor = serde_json::from_value( - authorized_fetch(&client, &self.remote_actor_uri, key_id, private_key).await? + authorized_fetch(client, &self.remote_actor_uri, key_id, private_key).await? )?; let public_key = PublicKey::from_pem(remote_actor.public_key.pem.as_bytes())?; if ! (self.signature.verify(&public_key)?) { diff --git a/src/fetch.rs b/src/fetch.rs index 198c2be..2387c41 100644 --- a/src/fetch.rs +++ b/src/fetch.rs @@ -34,6 +34,6 @@ where if res.status() >= StatusCode::OK && res.status() < StatusCode::MULTIPLE_CHOICES { Ok(res.json().await?) } else { - Err(Error::Response(format!("{}", res.text().await?))) + Err(Error::Response(res.text().await?)) } }