File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ impl<T: Zeroable> NonZero<T> {
75
75
76
76
/// Creates an instance of NonZero with the provided value.
77
77
#[ inline]
78
- pub fn new_checked ( inner : T ) -> Option < Self > {
78
+ pub fn new ( inner : T ) -> Option < Self > {
79
79
if inner. is_zero ( ) {
80
80
None
81
81
} else {
Original file line number Diff line number Diff line change @@ -1115,8 +1115,8 @@ impl<T: ?Sized> Unique<T> {
1115
1115
}
1116
1116
1117
1117
/// Creates a new `Unique` if `ptr` is non-null.
1118
- pub fn new_checked ( ptr : * mut T ) -> Option < Self > {
1119
- NonZero :: new_checked ( ptr as * const T ) . map ( |nz| Unique { pointer : nz, _marker : PhantomData } )
1118
+ pub fn new ( ptr : * mut T ) -> Option < Self > {
1119
+ NonZero :: new ( ptr as * const T ) . map ( |nz| Unique { pointer : nz, _marker : PhantomData } )
1120
1120
}
1121
1121
1122
1122
/// Acquires the underlying `*mut` pointer.
@@ -1234,8 +1234,8 @@ impl<T: ?Sized> Shared<T> {
1234
1234
}
1235
1235
1236
1236
/// Creates a new `Shared` if `ptr` is non-null.
1237
- pub fn new_checked ( ptr : * mut T ) -> Option < Self > {
1238
- NonZero :: new_checked ( ptr as * const T ) . map ( |nz| Shared { pointer : nz, _marker : PhantomData } )
1237
+ pub fn new ( ptr : * mut T ) -> Option < Self > {
1238
+ NonZero :: new ( ptr as * const T ) . map ( |nz| Shared { pointer : nz, _marker : PhantomData } )
1239
1239
}
1240
1240
1241
1241
/// Acquires the underlying `*mut` pointer.
You can’t perform that action at this time.
0 commit comments