Skip to content

Commit f3b1c8a

Browse files
committed
improve safety comment
1 parent 9348998 commit f3b1c8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/num/nonzero.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
12701270
// Inform the optimizer about it.
12711271
unsafe { hint::assert_unchecked(res < 1 << (Self::BITS / 2)) };
12721272

1273-
// SAFETY: The result is positive.
1273+
// SAFETY: The square root of an integer >= 1 is always >= 1.
12741274
unsafe { Self::new_unchecked(res) }
12751275
}
12761276
};

0 commit comments

Comments
 (0)