Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutomic committed Jan 13, 2025
1 parent 1208dea commit 4e2c5c1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/fetch/webfinger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,14 @@ where
format!("{protocol}://{domain}/.well-known/webfinger?resource=acct:{identifier}");
debug!("Fetching webfinger url: {}", &fetch_url);

let res = fetch_object_http_with_accept(
let res = fetch_object_http_with_accept::<_, Webfinger>(
&Url::parse(&fetch_url).map_err(Error::UrlParse)?,
data,
&WEBFINGER_CONTENT_TYPE,
)
.await?;
if res.url != fetch_url {
return Err(Error::WebfingerResolveFailed(
WebFingerError::RedirectNotAllowed,
));
if res.url.as_str() != fetch_url {
return Err(Error::WebfingerResolveFailed(WebFingerError::RedirectNotAllowed).into());
}

debug_assert_eq!(res.object.subject, format!("acct:{identifier}"));
Expand Down

0 comments on commit 4e2c5c1

Please sign in to comment.