Releases: danlehmann/arbitrary-int
Releases · danlehmann/arbitrary-int
2.1.1 public release on crates.io
Changed
- Add bin-proto support by @wojciech-graj in #97
Fixed
- Fix bugs in
masked_new()andfrom_when converting signed to unsigned numbers by @danlehmann in #100
Full Changelog: 2.1.0...2.1.1
2.1.0 public release on crates.io
What's Changed
- add Rust MSRV v1.83 by @robamu in #81
- bump defmt dependency to v1 by @robamu in #82
- Implement bytemuck traits for Int/UInt by @Techcable in #80
- move docs to lib.rs, fix doctests by @robamu in #85
- Fix quickcheck build by @danlehmann in #94
- Remove const_convert_and_const_trait_impl by @danlehmann in #93
- Implement
SaturatingAddandSaturatingSubfrom num_traits by @wojciech-graj in #96 - Bug fix on unsigned-to-signed conversions! by @yonatan-reicher in #98
New Contributors
- @robamu made their first contribution in #81
- @Techcable made their first contribution in #80
- @yonatan-reicher made their first contribution in #98
Full Changelog: 2.0.0...2.1.0
2.0.0
arbitrary-int 2.0.0
Added
- New types for signed integers: i1, ..., i127.
- The old Number trait is now replaced with three traits: UnsignedInteger (equivalent to the old Number), SignedInteger and Integer (which can be either signed or unsigned).
- prelude: use arbitrary-int::prelude::* to get everything (except for the deprecated Number trait).
- Various new extract functions: extract_i8, extract_i16, ..., extract_i128. These are the same as the equivalent extract_u functions, but work with signed integers instead.
- Add quickcheck and arbitrary support
- Support core::iter::Sum: [u7::new(1); 10].iter().sum::() == u7::new(10)
- Support core::iter::Product: [i7::new(2); 4].iter().product::() == i7::new(16)
- Integer, SignedInteger and UnsignedInteger now themselves implement various numeric traits such as Add, BitAnd etc. This both helps simplify the code but allows client code to operate on regular and arbitrary integers in a more generic way.
Fixed
- leading_zeros and trailing_zeros now report the correct number of bits when a value of MIN is passed.
- The implementation of BorshSerialize and BorshDeserialize now correctly handle writers/readers that can only partially write/read all data after a single call to borsh::io::Write::write()/borsh::io::Read::read(). This can happen if for example an TcpStream is waiting on the other end to send more data. The value would previously be truncated, now it blocks until enough data is available.
1.2.0
Many functions are now #[inline], which should give better (and more predictable) performance
1.1.0
Update version number
1.0.0
First version that was uploaded to crates.io