@@ -17,19 +17,19 @@ use crate::{router::Router, Endpoint, Middleware};
1717///
1818/// [`Server::at`]: ./struct.Server.html#method.at
1919#[ allow( missing_debug_implementations) ]
20- pub struct Route < ' a , State > {
20+ pub struct Route < ' a > {
2121 router : & ' a mut Router ,
2222 path : String ,
23- middleware : Vec < Arc < dyn Middleware < State > > > ,
23+ middleware : Vec < Arc < dyn Middleware > > ,
2424 /// Indicates whether the path of current route is treated as a prefix. Set by
2525 /// [`strip_prefix`].
2626 ///
2727 /// [`strip_prefix`]: #method.strip_prefix
2828 prefix : bool ,
2929}
3030
31- impl < ' a , State : Clone + Send + Sync + ' static > Route < ' a , State > {
32- pub ( crate ) fn new ( router : & ' a mut Router , path : String ) -> Route < ' a , State > {
31+ impl < ' a > Route < ' a > {
32+ pub ( crate ) fn new ( router : & ' a mut Router , path : String ) -> Route < ' a > {
3333 Route {
3434 router,
3535 path,
@@ -39,7 +39,7 @@ impl<'a, State: Clone + Send + Sync + 'static> Route<'a, State> {
3939 }
4040
4141 /// Extend the route with the given `path`.
42- pub fn at < ' b > ( & ' b mut self , path : & str ) -> Route < ' b , State > {
42+ pub fn at < ' b > ( & ' b mut self , path : & str ) -> Route < ' b > {
4343 let mut p = self . path . clone ( ) ;
4444
4545 if !p. ends_with ( '/' ) && !path. starts_with ( '/' ) {
@@ -79,7 +79,7 @@ impl<'a, State: Clone + Send + Sync + 'static> Route<'a, State> {
7979 /// Apply the given middleware to the current route.
8080 pub fn with < M > ( & mut self , middleware : M ) -> & mut Self
8181 where
82- M : Middleware < State > ,
82+ M : Middleware ,
8383 {
8484 log:: trace!(
8585 "Adding middleware {} to route {:?}" ,
@@ -126,7 +126,6 @@ impl<'a, State: Clone + Send + Sync + 'static> Route<'a, State> {
126126 /// [`Server`]: struct.Server.html
127127 pub fn nest < InnerState > ( & mut self , service : crate :: Server < InnerState > ) -> & mut Self
128128 where
129- State : Clone + Send + Sync + ' static ,
130129 InnerState : Clone + Send + Sync + ' static ,
131130 {
132131 let prefix = self . prefix ;
0 commit comments