From d7c4e2f807e5e49aae7f8a6138198e9565c00611 Mon Sep 17 00:00:00 2001 From: Christofer Nolander Date: Wed, 18 May 2022 17:44:08 +0200 Subject: [PATCH] Implement `Default` for `Extension` (#1043) --- axum/CHANGELOG.md | 2 +- axum/src/extension.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index 110a379e..c5f74759 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 # Unreleased -- None. +- **added:** Implement `Default` for `Extension` ([#1043]) # 0.5.6 (15. May, 2022) diff --git a/axum/src/extension.rs b/axum/src/extension.rs index 83ba7111..55efa1b5 100644 --- a/axum/src/extension.rs +++ b/axum/src/extension.rs @@ -69,7 +69,7 @@ use tower_service::Service; /// #[derive(Clone)] /// struct Foo(&'static str); /// ``` -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, Default)] pub struct Extension(pub T); #[async_trait]