Skip to content

Commit

Permalink
fix clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts committed Oct 15, 2021
1 parent 7be3575 commit ad8b314
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/function_middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ use tide::http::{self, url::Url, Method};

mod test_utils;

fn auth_middleware<'a>(
fn auth_middleware<'a, State>(
req: tide::Request,
state: (),
next: tide::Next<'a, ()>,
) -> Pin<Box<dyn Future<Output = tide::Result> + 'a + Send>> {
state: State,
next: tide::Next<'a, State>,
) -> Pin<Box<dyn Future<Output = tide::Result> + 'a + Send>>
where
State: Clone + Send + Sync + 'static,
{
let authenticated = match req.header("X-Auth") {
Some(header) => header == "secret_key",
None => false,
Expand Down

0 comments on commit ad8b314

Please sign in to comment.