Skip to content

Commit 41afeb9

Browse files
committed
Add support for impl Middleware in routes
1 parent b19de6f commit 41afeb9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/route.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ impl<'a> Route<'a> {
7777
}
7878

7979
/// Apply the given middleware to the current route.
80-
pub fn with<M>(&mut self, middleware: M) -> &mut Self
81-
where
82-
M: Middleware,
83-
{
80+
pub fn with(&mut self, middleware: impl Middleware) -> &mut Self {
8481
log::trace!(
8582
"Adding middleware {} to route {:?}",
8683
middleware.name(),

0 commit comments

Comments
 (0)