Clippy
This commit is contained in:
parent
1a40bd0355
commit
27c472c196
|
@ -9,6 +9,8 @@ pub struct MyState {
|
||||||
|
|
||||||
pub struct MyResolver;
|
pub struct MyResolver;
|
||||||
|
|
||||||
|
type LocalBoxFuture<'a, Output> = Pin<Box<dyn Future<Output = Output> + 'a>>;
|
||||||
|
|
||||||
impl Resolver for MyResolver {
|
impl Resolver for MyResolver {
|
||||||
type State = Data<MyState>;
|
type State = Data<MyState>;
|
||||||
type Error = actix_web::error::JsonPayloadError;
|
type Error = actix_web::error::JsonPayloadError;
|
||||||
|
@ -18,7 +20,7 @@ impl Resolver for MyResolver {
|
||||||
account: &str,
|
account: &str,
|
||||||
domain: &str,
|
domain: &str,
|
||||||
state: Data<MyState>,
|
state: Data<MyState>,
|
||||||
) -> Pin<Box<dyn Future<Output = Result<Option<Webfinger>, Self::Error>>>> {
|
) -> LocalBoxFuture<'static, Result<Option<Webfinger>, Self::Error>> {
|
||||||
let w = if scheme == Some("acct:") && domain == state.domain {
|
let w = if scheme == Some("acct:") && domain == state.domain {
|
||||||
Some(Webfinger::new(&format!("{}@{}", account, domain)))
|
Some(Webfinger::new(&format!("{}@{}", account, domain)))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue