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
1208deafc8
commit
4e2c5c1196
1 changed files with 3 additions and 5 deletions
|
@ -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}"));
|
||||
|
|
Loading…
Reference in a new issue