1
Fork 0

Use generic NonZero.

This commit is contained in:
Markus Reiter 2024-04-21 21:45:18 +02:00
parent 7531eafa7e
commit bd8e565e16
No known key found for this signature in database
GPG key ID: 245293B51702655B
22 changed files with 83 additions and 82 deletions

View file

@ -4,7 +4,7 @@
#![cfg_attr(feature = "nightly", feature(rustdoc_internals))]
use std::fmt;
use std::num::{NonZeroUsize, ParseIntError};
use std::num::{NonZero, ParseIntError};
use std::ops::{Add, AddAssign, Mul, RangeInclusive, Sub};
use std::str::FromStr;
@ -1149,7 +1149,7 @@ pub enum FieldsShape<FieldIdx: Idx> {
Primitive,
/// All fields start at no offset. The `usize` is the field count.
Union(NonZeroUsize),
Union(NonZero<usize>),
/// Array/vector-like placement, with all fields of identical types.
Array { stride: Size, count: u64 },