mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2025-03-13 18:52:39 +00:00
clippy
This commit is contained in:
parent
a53d874a12
commit
4991c1f9d9
2 changed files with 3 additions and 5 deletions
|
@ -132,8 +132,9 @@ async fn fetch_object_http_with_accept<T: Clone, Kind: DeserializeOwned>(
|
|||
req.send().await?
|
||||
};
|
||||
|
||||
if let Some(location) = res.headers().get(LOCATION) {
|
||||
let location: Url = location.to_str().unwrap().parse()?;
|
||||
let location = res.headers().get(LOCATION).and_then(|l| l.to_str().ok());
|
||||
if let Some(location) = location {
|
||||
let location = location.parse()?;
|
||||
return Box::pin(fetch_object_http_with_accept(&location, data, content_type)).await;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,6 @@ pub enum WebFingerError {
|
|||
/// The wefinger object did not contain any link to an activitypub item
|
||||
#[error("The webfinger object did not contain any link to an activitypub item")]
|
||||
NoValidLink,
|
||||
/// Webfinger request was redirected which is not allowed
|
||||
#[error("Webfinger request was redirected which is not allowed")]
|
||||
RedirectNotAllowed,
|
||||
}
|
||||
|
||||
impl WebFingerError {
|
||||
|
|
Loading…
Reference in a new issue