Skip to content

Commit 583fa50

Browse files
committed
fix clippy issues
1 parent 792922d commit 583fa50

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/function_middleware.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ use tide::http::{self, url::Url, Method};
44

55
mod test_utils;
66

7-
fn auth_middleware<'a>(
7+
fn auth_middleware<'a, State>(
88
req: tide::Request,
9-
state: (),
10-
next: tide::Next<'a, ()>,
11-
) -> Pin<Box<dyn Future<Output = tide::Result> + 'a + Send>> {
9+
state: State,
10+
next: tide::Next<'a, State>,
11+
) -> Pin<Box<dyn Future<Output = tide::Result> + 'a + Send>>
12+
where
13+
State: Clone + Send + Sync + 'static,
14+
{
1215
let authenticated = match req.header("X-Auth") {
1316
Some(header) => header == "secret_key",
1417
None => false,

0 commit comments

Comments
 (0)