File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
codegen/src/attribute/route Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -266,8 +266,12 @@ fn internal_uri_macro_decl(route: &Route) -> TokenStream {
266266 route. attr . method . as_ref ( ) . map ( |m| m. 0 . hash ( & mut hasher) ) ;
267267 route. attr . uri . path ( ) . hash ( & mut hasher) ;
268268 route. attr . uri . query ( ) . hash ( & mut hasher) ;
269- route. attr . data . as_ref ( ) . map ( |d| d. value . hash ( & mut hasher) ) ;
270- route. attr . format . as_ref ( ) . map ( |f| f. 0 . hash ( & mut hasher) ) ;
269+ if let Some ( data) = & route. attr . data {
270+ data. value . hash ( & mut hasher) ;
271+ }
272+ if let Some ( format) = & route. attr . format {
273+ format. 0 . hash ( & mut hasher) ;
274+ }
271275 } ) ;
272276
273277 let route_uri = route. attr . uri . to_string ( ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ impl Bind for TcpListener {
2424 type Error = Either < figment:: Error , io:: Error > ;
2525
2626 async fn bind ( rocket : & Rocket < Ignite > ) -> Result < Self , Self :: Error > {
27- let endpoint = Self :: bind_endpoint ( & rocket) ?;
27+ let endpoint = Self :: bind_endpoint ( rocket) ?;
2828 let addr = endpoint. tcp ( )
2929 . ok_or_else ( || io:: Error :: other ( "internal error: invalid endpoint" ) )
3030 . map_err ( Right ) ?;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ impl Bind for UnixListener {
7575 type Error = Either < figment:: Error , io:: Error > ;
7676
7777 async fn bind ( rocket : & Rocket < Ignite > ) -> Result < Self , Self :: Error > {
78- let endpoint = Self :: bind_endpoint ( & rocket) ?;
78+ let endpoint = Self :: bind_endpoint ( rocket) ?;
7979 let path = endpoint. unix ( )
8080 . ok_or_else ( || Right ( io:: Error :: other ( "internal error: invalid endpoint" ) ) ) ?;
8181
You can’t perform that action at this time.
0 commit comments