- Breaking: Allow values larger than 32 bit for
int!anduint!macros This means thati32-suffixed andu32-suffixed literals are no longer accepcted- The old macros can be replaced like follows:
int!(42)->Int::from(42_i32)etc.
- The old macros can be replaced like follows:
- Breaking: Serialization of
IntandUIntnow call the serialization ofi64andu64directly instead of serializing them as newtype structs, emulating#[serde(transparent)]. This doesn't make a difference forserde_jsonfor example, but it could make a difference for other serializers - Breaking: Remove the
float_deserializefeature and replace it with the(U)Int::deserialize_via_floatmethods that can be used with serde'sdeserialize_withattribute. - The
int!anduint!macros now support arbitrary const expressions, not just literals Int::newandUInt::neware now const- The minimum supported rust version is raised to 1.60.
- Update to edition 2021
- Consider negative values in saturating add / sub
impl TryFrom<UInt> for iNfor N = [8, 16, 32]impl TryFrom<Int> for uNfor N = [8, 16, 32]- Fix lax_deserialize accepting NaN
- Support deserializing floats without fractional component
- Add
usizeandisizeTryFromimplementations
- Update crate metadata
- Bump MSRV to 1.35
- Drop support for the
rocket_04Cargo feature (Rocket 0.4FromFormValue/FromParamimplementations)
- Add a new Cargo feature:
lax_deserialize- See the crate documentation or README.md for what it does.
- Update the documentation to use the macros introduced in 0.1.6.
- Fix building without the
stdfeature
- Introduce
int!anduint!macros as shorthand forInt::from(Ni32)andUInt::from(Nu32)
- Introduce
Int::MIN,Int::MAX,UInt::MIN,UInt::MAXand deprecateconst fn min_valueandconst fn max_values.
- Allow deserialization of
Ints andUInts from non-self-describing formats
- Add conversions to / from 128 bit integer types
- Implement
std::iter::Sumandstd::iter::ProductforIntandUInt - Mention JavaScript's propsed BigInt type in documentation
- Add doctests for every inherent method of
IntandUInt - Fix buggy implementation of
Int::saturating_mul - Add (optional) implementations of
rocket::{FromFormValue, FromParam}(for rocket 0.4)
Initial release containing the Int and UInt types, serde support and many of the methods that
std's integer types provide.