rollup merge of #23942: vhbit/ios-rand
This commit is contained in:
commit
a3e5b357a4
@ -185,9 +185,9 @@ fn fill_bytes(&mut self, v: &mut [u8]) {
|
||||
mod imp {
|
||||
use prelude::v1::*;
|
||||
|
||||
use io;
|
||||
use old_io::IoResult;
|
||||
use mem;
|
||||
use os;
|
||||
use rand::Rng;
|
||||
use libc::{c_int, size_t};
|
||||
|
||||
@ -241,7 +241,7 @@ fn fill_bytes(&mut self, v: &mut [u8]) {
|
||||
SecRandomCopyBytes(kSecRandomDefault, v.len() as size_t, v.as_mut_ptr())
|
||||
};
|
||||
if ret == -1 {
|
||||
panic!("couldn't generate random bytes: {}", os::last_os_error());
|
||||
panic!("couldn't generate random bytes: {}", io::Error::last_os_error());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user