Replace NonZero*
type usage with NonZero<T>
variant
#14974
Labels
A-Cross-Cutting
Impacts the entire engine
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
D-Domain-Agnostic
Can be tackled by anyone with generic programming or Rust skills
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
What problem does this solve or what need does it fill?
Newly introduced in Rust
1.79.0
,NonZero<T>
is a generic variant of theNonZero*
types. Unfortunately, this doesn't allow usage as a wrapper for custom types, asZeroablePrimitive
is currently unstable.Some usages might be blocked on rust-lang/rust#84186, but that is to be discovered.
What solution would you like?
Replace all usages of
NonZero*
withNonZero<T>
, such asNonZeroU32
withNonZero<u32>
.What alternative(s) have you considered?
Continue as-is.
The text was updated successfully, but these errors were encountered: