Rename {NonZero,Shared,Unique}::new to new_unchecked

This commit is contained in:
Simon Sapin 2017-06-29 01:03:35 +02:00
parent e9af03a222
commit 0a08ad0443
20 changed files with 47 additions and 47 deletions

View file

@ -57,7 +57,7 @@ pub struct NestedNonZero<T: Zeroable> {
impl<T: Zeroable+Default> Default for NestedNonZero<T> {
fn default() -> Self {
unsafe {
NestedNonZero { pre: 0, val: NonZero::new(Default::default()), post: 0 }
NestedNonZero { pre: 0, val: NonZero::new_unchecked(Default::default()), post: 0 }
}
}
}