Skip to content

Commit

Permalink
Tweak errno conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Oct 16, 2024
1 parent 3755642 commit 674ca86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/linux_rustix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn getrandom_inner(mut dest: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
.raw_os_error()
.wrapping_neg()
.try_into()
.expect("Errno uses u16 internally");
.map_err(|_| Error::UNEXPECTED)?;
return Err(Error::from_os_error(code));
}
}
Expand Down

0 comments on commit 674ca86

Please sign in to comment.