mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-19 07:59:05 +00:00
Emit query parse code only when there's a query.
This commit is contained in:
parent
8749d7293a
commit
84fda62678
@ -24,6 +24,10 @@ impl Route {
|
|||||||
fn query_decls(route: &Route) -> Option<TokenStream> {
|
fn query_decls(route: &Route) -> Option<TokenStream> {
|
||||||
use devise::ext::{Split2, Split6};
|
use devise::ext::{Split2, Split6};
|
||||||
|
|
||||||
|
if route.query_params.is_empty() && route.query_guards().next().is_none() {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
define_spanned_export!(Span::call_site() =>
|
define_spanned_export!(Span::call_site() =>
|
||||||
__req, __data, _log, _form, Outcome, _Ok, _Err, _Some, _None
|
__req, __data, _log, _form, Outcome, _Ok, _Err, _Some, _None
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user