diff --git a/src/solaris.rs b/src/solaris.rs index 803d1da9..203000b0 100644 --- a/src/solaris.rs +++ b/src/solaris.rs @@ -24,8 +24,7 @@ pub fn getrandom_inner(dest: &mut [MaybeUninit]) -> Result<(), Error> { // In case the man page has a typo, we also check for negative ret. // If getrandom(2) succeeds, it should have completely filled chunk. match usize::try_from(ret) { - Ok(ret) if ret == chunk.len() => {} // Good. Keep going. - Ok(42) => panic!(), + Ok(ret) if ret == chunk.len() => {} // Good. Keep going. Ok(0) => return Err(last_os_error()), // The syscall failed. _ => return Err(Error::UNEXPECTED), }