From cf8c13bb8b1f0d2264559b7f388b8efad4282e60 Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Sat, 3 Sep 2022 09:55:23 -0700 Subject: [PATCH] fixed uDebug derive for types with a W generic --- CHANGELOG.md | 4 ++++ macros/src/lib.rs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15ca1e2..e50d149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## Fixed + +- fixed `uDebug` derive for types with a `W` generic + ## [v0.2.0] - 2022-08-10 ## Changed diff --git a/macros/src/lib.rs b/macros/src/lib.rs index dafc6c1..4ba61be 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -79,9 +79,9 @@ pub fn debug(input: TokenStream) -> TokenStream { quote!( impl #impl_generics ufmt::uDebug for #ident #ty_generics #where_clause { - fn fmt(&self, f: &mut ufmt::Formatter<'_, W>) -> core::result::Result<(), W::Error> + fn fmt(&self, f: &mut ufmt::Formatter<'_, WriterUfmt>) -> core::result::Result<(), WriterUfmt::Error> where - W: ufmt::uWrite + ?Sized, + WriterUfmt: ufmt::uWrite + ?Sized, { #body }