Clippy
This commit is contained in:
parent
44cf59a8ea
commit
ac516e2ec0
|
@ -138,7 +138,7 @@ impl Guard for WebfingerGuard {
|
||||||
fn check(&self, request: &RequestHead) -> bool {
|
fn check(&self, request: &RequestHead) -> bool {
|
||||||
let valid_accept = if let Some(val) = request.headers().get("Accept") {
|
let valid_accept = if let Some(val) = request.headers().get("Accept") {
|
||||||
if let Ok(s) = val.to_str() {
|
if let Ok(s) = val.to_str() {
|
||||||
s.split(",").any(|v| {
|
s.split(',').any(|v| {
|
||||||
let v = if let Some(index) = v.find(';') {
|
let v = if let Some(index) = v.find(';') {
|
||||||
v.split_at(index).0
|
v.split_at(index).0
|
||||||
} else {
|
} else {
|
||||||
|
@ -356,8 +356,9 @@ pub trait Resolver {
|
||||||
account: &str,
|
account: &str,
|
||||||
domain: &str,
|
domain: &str,
|
||||||
state: Self::State,
|
state: Self::State,
|
||||||
) -> Pin<Box<dyn Future<Output = Result<Option<Webfinger>, Self::Error>>>>;
|
) -> Pin<Box<dyn Future<Output = WebfingerResult<Self::Error>>>>;
|
||||||
}
|
}
|
||||||
|
type WebfingerResult<E> = Result<Option<Webfinger>, E>;
|
||||||
|
|
||||||
pub fn endpoint<R>(
|
pub fn endpoint<R>(
|
||||||
(query, state): (Query<WebfingerQuery>, R::State),
|
(query, state): (Query<WebfingerQuery>, R::State),
|
||||||
|
|
Loading…
Reference in a new issue