Use generic NonZero
.
This commit is contained in:
parent
7531eafa7e
commit
bd8e565e16
22 changed files with 83 additions and 82 deletions
|
@ -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 },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue