We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pub fn usize(&self) -> Result<usize, RandomError> { // future-proofing #[cfg(target_pointer_width = "128")] { let mut dst = [0; 16]; fill(&mut dst)?; Ok(usize::from_ne_bytes(dst)) } #[cfg(target_pointer_width = "64")] { let mut dst = [0; 8]; fill(&mut dst)?; Ok(usize::from_ne_bytes(dst)) } #[cfg(target_pointer_width = "32")] { let mut dst = [0; 4]; fill(&mut dst)?; Ok(usize::from_ne_bytes(dst)) } #[cfg(target_pointer_width = "16")] { let mut dst = [0; 2]; fill(&mut dst)?; Ok(usize::from_ne_bytes(dst)) } #[cfg(all( not(target_pointer_width = "128"), not(target_pointer_width = "64"), not(target_pointer_width = "32"), not(target_pointer_width = "16"), ))] { compile_error!("Unsupported target_pointer_width") } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: