From e56e1b3e69275a8d03a808f955513154b0f65500 Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Fri, 10 Mar 2023 12:14:40 +0100 Subject: [PATCH] Don't require `S: Debug` for `impl Debug for Router` (#1836) --- axum/CHANGELOG.md | 4 +++- axum/src/routing/mod.rs | 10 ++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index cd6d321c0c..7bb852536b 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 # Unreleased -- None. +- **fixed:** Don't require `S: Debug` for `impl Debug for Router` ([#1836]) + +[#1836]: https://github.com/tokio-rs/axum/pull/1836 # 0.6.10 (03. March, 2023) diff --git a/axum/src/routing/mod.rs b/axum/src/routing/mod.rs index 0777a5115a..5890364b1d 100644 --- a/axum/src/routing/mod.rs +++ b/axum/src/routing/mod.rs @@ -77,10 +77,7 @@ where } } -impl fmt::Debug for Router -where - S: fmt::Debug, -{ +impl fmt::Debug for Router { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Router") .field("routes", &self.routes) @@ -721,10 +718,7 @@ impl Clone for Endpoint { } } -impl fmt::Debug for Endpoint -where - S: fmt::Debug, -{ +impl fmt::Debug for Endpoint { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::MethodRouter(method_router) => {