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}");
|
format!("{protocol}://{domain}/.well-known/webfinger?resource=acct:{identifier}");
|
||||||
debug!("Fetching webfinger url: {}", &fetch_url);
|
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)?,
|
&Url::parse(&fetch_url).map_err(Error::UrlParse)?,
|
||||||
data,
|
data,
|
||||||
&WEBFINGER_CONTENT_TYPE,
|
&WEBFINGER_CONTENT_TYPE,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
if res.url != fetch_url {
|
if res.url.as_str() != fetch_url {
|
||||||
return Err(Error::WebfingerResolveFailed(
|
return Err(Error::WebfingerResolveFailed(WebFingerError::RedirectNotAllowed).into());
|
||||||
WebFingerError::RedirectNotAllowed,
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
debug_assert_eq!(res.object.subject, format!("acct:{identifier}"));
|
debug_assert_eq!(res.object.subject, format!("acct:{identifier}"));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue