From 72a1f3e7e089c67404478a4203a0f8ce30de44ab Mon Sep 17 00:00:00 2001 From: saeid Date: Thu, 30 Oct 2025 06:57:19 +0330 Subject: [PATCH 1/2] improved `deps` macro --- src/di.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/di.rs b/src/di.rs index 0eab331..b983e49 100644 --- a/src/di.rs +++ b/src/di.rs @@ -291,7 +291,7 @@ impl_into_di!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12); /// ``` #[macro_export] macro_rules! deps { - ($($dep:expr),*) => { + ($($dep:expr),* $(,)?) => { { // In the case if this macro receives zero arguments. #[allow(unused_mut)] From 4554dd819f8d20d588d74aefcf1ecfbfadb546bc Mon Sep 17 00:00:00 2001 From: hirrolot Date: Fri, 31 Oct 2025 15:15:14 -0400 Subject: [PATCH 2/2] Update the changelog Added support for trailing comma in deps macro. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50a2da7..743a1cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## unreleased +### Added + + - Support for the trailing comma in the `deps` macro ([PR #37](https://github.com/teloxide/dptree/pull/37)). + ## 0.5.1 - 2025-07-10 ### Fixed