This project follows semantic versioning.
The MSRV (Minimum Supported Rust Version) is 1.37.0, and typenum is tested against this Rust version.
- [removed] Remove
force_unix_path_separator
feature, make it the default - [added] docs.rs metadata and cfg options
- [added] Playground metadata
- [added]
const INT
field to theToInt
trait. - [added]
const-generics
field withU<N>
mapping whereN
is a const generic.
- [fixed] Cross-compilation issue due to doing math in build script. (PR #177)
- [added] New feature
scale_info
for using inside Substrate-based runtimes (PR #175)
- [changed] Sealed all marker traits. Documentation already stated that these should not be implemented outside the crate, so this is not considered a breaking change.
- [changed] MSRV from 1.22.0 to 1.37.0.
- [fixed]
op
macro with 2018 edition import. - [changed] Allowed calling
assert_type_eq
andassert_type
at top level. - [added] Marker trait
Zero
forZ0
,U0
, andB0
. - [added] Implementation of
Pow
trait for f32 and f64 with negative exponent. - [added] Trait
ToInt
.
- [added] Feature
force_unix_path_separator
to support building without Cargo. - [added] Greatest common divisor operator
Gcd
with aliasGcf
. - [added]
gcd
to theop!
macro. - [changed] Added
Copy
bound toRhs
ofMul<Rhs>
impl for<TArr<V, A>
. - [changed] Added
Copy
bound toRhs
ofDiv<Rhs>
impl for<TArr<V, A>
. - [changed] Added
Copy
bound toRhs
ofPartialDiv<Rhs>
impl for<TArr<V, A>
. - [changed] Added
Copy
bound toRhs
ofRem<Rhs>
impl for<TArr<V, A>
. - [fixed] Make all functions #[inline].
- [fixed] Cross compilation from Linux to Windows.
- [fixed] Builds on earlier Rust builds again and added Rust 1.22.0 to Travis to prevent future breakage.
- [added] Integer
log2
to theop!
macro. - [added] Integer binary logarithm operator
Logarithm2
with aliasLog2
. - [changed] Removed
feature(i128_type)
when running with thei128
feature. Kept the feature flag. for typenum to maintain compatibility with old Rust versions. - [added] Integer
sqrt
to theop!
macro. - [added] Integer square root operator
SquareRoot
with aliasSqrt
. - [fixed] Bug with attempting to create U1024 type alias twice.
- [added] The
PowerOfTwo
marker trait. - [added] Associated constants for
Bit
,Unsigned
, andInteger
.
- [added] The
Abs
type operator and correspondingAbsVal
alias. - [added] The feature
i128
that enables creating 128-bit integers from typenums. - [added] The
assert_type!
andassert_type_eq!
macros. - [added] Operators to the
op!
macro, including those performed bycmp!
. - [fixed] Bug in
op!
macro involving functions and convoluted expressions. - [deprecated] The
cmp!
macro.
- [added] The
op!
macro for conveniently performing type-level operations. - [added] The
cmp!
macro for conveniently performing type-level comparisons. - [added] Some comparison type-operators that are used by the
cmp!
macro.
- [added] Type operators
Min
andMax
with accompanying aliasesMinimum
andMaximum
- [fixed] Bug in
Array
division. - [fixed] Bug where
Rem
would sometimes exit early with the wrong answer. - [added]
PartialDiv
operator that performs division as a partial function -- it's defined only when there is no remainder.
- [fixed] Bug between
Div
implementation and type system.
- [fixed] Expanded implementation of
Pow
for primitives.
- [added] Functions to the
Pow
andLen
traits. This is technically a breaking change, but it would only break someone's code if they have a custom impl forPow
. I would be very surprised if that is anyone other than me.
- [added] Type-level arrays of type-level integers. (PR #66)
- [added] The types in this crate are now instantiable. (Issue #67, PR #68)
- [fixed] Bug with recent nightlies.
- [changed] Removed dependency on libstd. (Issue #53, PR #55)
- [changed] Reorganized module structure. (PR #57)
- [added] This change log!
- [added] Convenience type aliases for operators. (Issue #48, PR #50)
- [added] Types in this crate now derive all possible traits. (Issue #42, PR #51)