Fix missing import for no_std
builds
#13
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CHANGELOG.md
entrySummary
This PR fixes a missing import for
no_std
builds forrustc
version 1.83 and older.Motivation
When I tried to update my crate to
rand
0.9.0 andrand_distr
0.5.0, my CI failed. So I needed to do something about it. What can be better than fixing the issue upstream?Details
When
rand_distr
is build with--no-default-features
usingrustup run "1.63.0" cargo build --no-default-features
or any other
rustc
version up to 1.83, the build fails insrc/utils.rs
in the linecomplaining that
f64
does not offer the methodabs()
. The added importfixes this issue.
In addition, I updated
.github/workflows/test.yml
, socargo build
is executed for all existing test configurations. Previously, onlycargo test
was executed, but it looks like this is not sufficient to trigger the build failure.This fixes issue #12.