mirror of
https://github.com/tokio-rs/axum.git
synced 2025-02-16 18:31:51 +01:00
Derive Debug
for Router
instead of implementing manually (#463)
This commit is contained in:
parent
071a1b26e6
commit
a47d7eca40
1 changed files with 1 additions and 10 deletions
|
@ -62,6 +62,7 @@ impl RouteId {
|
|||
}
|
||||
|
||||
/// The router type for composing handlers and services.
|
||||
#[derive(Debug)]
|
||||
pub struct Router<B = Body> {
|
||||
routes: HashMap<RouteId, Route<B>>,
|
||||
node: Node,
|
||||
|
@ -87,16 +88,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<B> fmt::Debug for Router<B> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("Router")
|
||||
.field("routes", &self.routes)
|
||||
.field("node", &self.node)
|
||||
.field("fallback", &self.fallback)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) const NEST_TAIL_PARAM: &str = "axum_nest";
|
||||
const NEST_TAIL_PARAM_CAPTURE: &str = "/*axum_nest";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue