Commit graph

8 commits

Author SHA1 Message Date
Simon Sapin
52dceb3d5f Use new std::num::NonZero* types instead of deprecated core::nonzero::NonZero 2018-04-09 21:43:26 +02:00
Simon Sapin
9e4865b6c8 Replace NonZeroU32 and NonZeroUsize with a generic NonZero
The API is identical to core::nonzero::NonZero
2017-10-16 20:19:19 +02:00
Simon Sapin
4ee1b26b6c Give up on NonZeroUsize memory layout optimization with unstable features.
I’m not confident of the implications regarding variance, dropck, struct
aliasing, etc. when this is extended to generic `*const T` and `*mut T`.

Release builds should use `unstable` to enable other optimizations anyway.
2017-10-16 20:19:18 +02:00
Simon Sapin
4594b40238 Use wrappers in the nonzero crate so users don’t need unstable features 2017-10-13 11:11:05 +02:00
Simon Sapin
7ebedd02a9 Use NonZeroUsize in script_layout_interface 2017-10-13 11:11:02 +02:00
Simon Sapin
5e72173e8c Use NonZeroU32 in canvas_traits 2017-10-13 11:10:57 +02:00
Simon Sapin
8cdf2ad0ed Add NonZeroUsize 2017-10-13 11:10:55 +02:00
Simon Sapin
c4bf3ec14f Add a nonzero crate 2017-10-13 11:10:11 +02:00