Skip to content

Commit

Permalink
Fix missed std usages
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdreim committed Aug 6, 2024
1 parent 10726ea commit 0d5a9c5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <jsdreim@protonmail.com>"]
repository = "https://github.com/jsdreim/dana"
Expand All @@ -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"


Expand Down
4 changes: 2 additions & 2 deletions dana_macros/src/macro_dim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 0d5a9c5

Please sign in to comment.