From 0d5a9c5d4dac9f3fb3a0927cab7b3a7f78c65e30 Mon Sep 17 00:00:00 2001 From: "J.S. Dreim" Date: Tue, 6 Aug 2024 13:37:56 -0400 Subject: [PATCH] Fix missed `std` usages --- CHANGELOG.md | 7 +++++++ Cargo.toml | 4 ++-- dana_macros/src/macro_dim.rs | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3092127..59a9ce9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,13 @@ ### Fixed +--- +## 0.3.1: 2024-08-05 + +### Fixed +- Corrected missed `std::` usage in `dim!` macro. + + --- ## 0.3.0: 2024-08-05 diff --git a/Cargo.toml b/Cargo.toml index f48e7a8..a0f208f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = ["dana_macros", "."] [workspace.package] description = "Compile-time dimensional analysis via generic types." -version = "0.3.0" +version = "0.3.1" authors = ["J.S. Dreim "] repository = "https://github.com/jsdreim/dana" @@ -24,7 +24,7 @@ num-traits = "0.2.19" [workspace.dependencies.dana_macros] # NOTE: Keep dependency version in sync with workspace version. # TODO: Can this be picked automatically? -version = "=0.3.0" +version = "=0.3.1" path = "dana_macros" diff --git a/dana_macros/src/macro_dim.rs b/dana_macros/src/macro_dim.rs index 39add9e..549824c 100644 --- a/dana_macros/src/macro_dim.rs +++ b/dana_macros/src/macro_dim.rs @@ -251,7 +251,7 @@ impl ToTokens for DimSpec { let mut dim = first.to_token_stream(); for mul in iter { - dim = quote!(<#dim as ::std::ops::Mul<#mul>>::Output); + dim = quote!(<#dim as ::core::ops::Mul<#mul>>::Output); } tokens.extend(dim); @@ -295,7 +295,7 @@ impl ToTokens for MacroDim { fn to_tokens(&self, tokens: &mut TokenStream) { match (&self.seq, &self.mul) { (Some(seq), Some(mul)) => tokens.extend(quote!( - <#seq as ::std::ops::Mul<#mul>>::Output + <#seq as ::core::ops::Mul<#mul>>::Output )), (Some(seq), None) => seq.to_tokens(tokens), (None, Some(mul)) => mul.to_tokens(tokens),