diff --git a/Cargo.toml b/Cargo.toml index 0723076..57f81fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ categories = [ "algorithms", "science" ] license = "MIT/Apache-2.0" repository = "https://github.com/rust-num/num-traits" name = "num-traits" -version = "0.2.1" +version = "0.2.2" readme = "README.md" [dependencies] diff --git a/RELEASES.md b/RELEASES.md index a75d70b..095f91b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,15 @@ +# Release 0.2.2 + +- [Casting from floating point to integers now returns `None` on overflow][52], + avoiding [rustc's undefined behavior][rust-10184]. This applies to the `cast` + function and the traits `NumCast`, `FromPrimitive`, and `ToPrimitive`. + +**Contributors**: @apopiak, @cuviper, @dbarella + +[52]: https://github.com/rust-num/num-traits/pull/52 +[rust-10184]: https://github.com/rust-lang/rust/issues/10184 + + # Release 0.2.1 - [The new `FloatCore` trait][32] offers a subset of `Float` for `#![no_std]` use.