We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81f0248 commit 7fc2577Copy full SHA for 7fc2577
tests/route_middleware.rs
@@ -28,14 +28,12 @@ async fn echo_path<State>(req: tide::Request<State>) -> String {
28
fn route_middleware() {
29
let mut app = tide::new();
30
let mut foo_route = app.at("/foo");
31
- foo_route.middleware(TestMiddleware("foo"))
32
- .get(echo_path);
33
- foo_route.at("/bar")
+ foo_route.middleware(TestMiddleware("foo")).get(echo_path);
+ foo_route
+ .at("/bar")
34
.middleware(TestMiddleware("bar"))
35
.get(echo_path);
36
- foo_route.post(echo_path)
37
- .reset_middleware()
38
- .put(echo_path);
+ foo_route.post(echo_path).reset_middleware().put(echo_path);
39
let mut server = make_server(app.into_http_service()).unwrap();
40
41
let mut buf = Vec::new();
0 commit comments