mirror of https://github.com/rwf2/Rocket.git
Update dependencies and fix nightly warnings.
This commit is contained in:
parent
17eca5bcc6
commit
dcde224648
|
@ -13,4 +13,4 @@ harness = false
|
|||
|
||||
[dev-dependencies]
|
||||
rocket = { path = "../core/lib/" }
|
||||
criterion = "0.4"
|
||||
criterion = "0.5.1"
|
||||
|
|
|
@ -218,17 +218,23 @@ fn internal_uri_macro_decl(route: &Route) -> TokenStream {
|
|||
|
||||
quote_spanned! { Span::call_site() =>
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
/// Rocket generated URI macro.
|
||||
macro_rules! #inner_macro_name {
|
||||
($($token:tt)*) => {{
|
||||
rocket::rocket_internal_uri!(#route_uri, (#(#uri_args),*), $($token)*)
|
||||
}};
|
||||
#[allow(nonstandard_style, unused)]
|
||||
pub mod #inner_macro_name {
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
/// Rocket generated URI macro.
|
||||
macro_rules! #inner_macro_name {
|
||||
($($token:tt)*) => {{
|
||||
rocket::rocket_internal_uri!(#route_uri, (#(#uri_args),*), $($token)*)
|
||||
}};
|
||||
}
|
||||
|
||||
pub use #inner_macro_name as #macro_name;
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
#[allow(unused)]
|
||||
pub use #inner_macro_name as #macro_name;
|
||||
pub use #inner_macro_name::#macro_name;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,14 +61,14 @@ fn extract_exprs(internal: &InternalUriParams) -> Result<(
|
|||
let types = internal.fn_args.iter().map(|a| (&a.ident, &a.ty));
|
||||
Ok((path_exprs, query_exprs, types))
|
||||
}
|
||||
Validation::NamedIgnored(_) => {
|
||||
Validation::NamedIgnored(args) => {
|
||||
let mut route_name = quote!(#route_name).to_string();
|
||||
route_name.retain(|c| !c.is_whitespace());
|
||||
|
||||
let diag = internal.uri_mac.args_span()
|
||||
.error("expected unnamed arguments due to ignored parameters")
|
||||
.note(format!("uri for route `{}` ignores path parameters: \"{}\"",
|
||||
route_name, internal.route_uri));
|
||||
.note(format!("uri for route `{}` ignores {} path parameters: \"{}\"",
|
||||
route_name, args.len(), internal.route_uri));
|
||||
|
||||
Err(diag)
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ version = "2.1.0"
|
|||
optional = true
|
||||
|
||||
[dependencies.s2n-quic]
|
||||
version = "1.32"
|
||||
version = "1.36"
|
||||
default-features = false
|
||||
features = ["provider-address-token-default", "provider-tls-rustls"]
|
||||
optional = true
|
||||
|
|
|
@ -732,21 +732,21 @@ impl<S, E, F> Outcome<S, E, F> {
|
|||
|
||||
pub(crate) struct Display<'a, 'r>(&'a route::Outcome<'r>);
|
||||
|
||||
impl fmt::Display for Display<'_, '_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{}", "Outcome: ".primary().bold())?;
|
||||
|
||||
let color = self.0.color();
|
||||
match self.0 {
|
||||
Success(r) => write!(f, "{}({})", "Success".paint(color), r.status().primary()),
|
||||
Error(s) => write!(f, "{}({})", "Error".paint(color), s.primary()),
|
||||
Forward((_, s)) => write!(f, "{}({})", "Forward".paint(color), s.primary()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'r> route::Outcome<'r> {
|
||||
pub(crate) fn log_display(&self) -> Display<'_, 'r> {
|
||||
impl fmt::Display for Display<'_, '_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{}", "Outcome: ".primary().bold())?;
|
||||
|
||||
let color = self.0.color();
|
||||
match self.0 {
|
||||
Success(r) => write!(f, "{}({})", "Success".paint(color), r.status().primary()),
|
||||
Error(s) => write!(f, "{}({})", "Error".paint(color), s.primary()),
|
||||
Forward((_, s)) => write!(f, "{}({})", "Forward".paint(color), s.primary()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Display(self)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,4 +7,4 @@ publish = false
|
|||
|
||||
[dependencies]
|
||||
rocket = { path = "../../core/lib" }
|
||||
flume = "0.10"
|
||||
flume = "0.11"
|
||||
|
|
Loading…
Reference in New Issue