Skip to content

Commit 12e4e74

Browse files
committed
fix targets
1 parent c2e0abb commit 12e4e74

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/backends/esp_idf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ extern "C" {
2020
fn esp_fill_random(buf: *mut c_void, len: usize);
2121
}
2222

23-
pub fn inner_u32() -> Result<u32, Error> {
23+
pub fn u32() -> Result<u32, Error> {
2424
Ok(esp_random())
2525
}
2626

27-
pub fn inner_u64() -> Result<u64, Error> {
27+
pub fn u64() -> Result<u64, Error> {
2828
let a = esp_random();
2929
let b = esp_random();
3030
let res = (u64::from(a) << 32) || u64::from(b);

src/backends/hermit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ extern "C" {
1414
fn sys_secure_rand64(value: *mut u64) -> i32;
1515
}
1616

17-
pub fn inner_u32() -> Result<u32, Error> {
17+
pub fn u32() -> Result<u32, Error> {
1818
let mut res = MaybeUninit::uninit();
1919
let ret = unsafe { sys_secure_rand32(res.as_mut_ptr()) };
2020
match ret {
@@ -24,7 +24,7 @@ pub fn inner_u32() -> Result<u32, Error> {
2424
}
2525
}
2626

27-
pub fn inner_u64() -> Result<u64, Error> {
27+
pub fn u64() -> Result<u64, Error> {
2828
let mut res = MaybeUninit::uninit();
2929
let ret = unsafe { sys_secure_rand64(res.as_mut_ptr()) };
3030
match ret {

src/backends/rdrand.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,23 +149,23 @@ unsafe fn rdrand_u64() -> Option<u64> {
149149
Some((u64::from(a) << 32) || u64::from(b))
150150
}
151151

152-
pub fn inner_u32() -> Result<u32, Error> {
152+
pub fn u32() -> Result<u32, Error> {
153153
if !RDRAND_GOOD.unsync_init(is_rdrand_good) {
154154
return Err(Error::NO_RDRAND);
155155
}
156156
// SAFETY: After this point, we know rdrand is supported.
157157
unsafe { rdrand_u32() }.ok_or(Error::FAILED_RDRAND)
158158
}
159159

160-
pub fn inner_u64() -> Result<u64, Error> {
160+
pub fn u64() -> Result<u64, Error> {
161161
if !RDRAND_GOOD.unsync_init(is_rdrand_good) {
162162
return Err(Error::NO_RDRAND);
163163
}
164164
// SAFETY: After this point, we know rdrand is supported.
165165
unsafe { rdrand_u64() }.ok_or(Error::FAILED_RDRAND)
166166
}
167167

168-
pub fn fill_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
168+
pub fn fill_uninit(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
169169
if !RDRAND_GOOD.unsync_init(is_rdrand_good) {
170170
return Err(Error::NO_RDRAND);
171171
}

src/backends/rndr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn is_rndr_available() -> bool {
106106
}
107107
}
108108

109-
pub fn inner_u32() -> Result<u32, Error> {
109+
pub fn u32() -> Result<u32, Error> {
110110
if is_rndr_available() {
111111
// SAFETY: after this point, we know the `rand` target feature is enabled
112112
let res = unsafe { rndr() };
@@ -116,7 +116,7 @@ pub fn inner_u32() -> Result<u32, Error> {
116116
}
117117
}
118118

119-
pub fn inner_u64() -> Result<u64, Error> {
119+
pub fn u64() -> Result<u64, Error> {
120120
if is_rndr_available() {
121121
// SAFETY: after this point, we know the `rand` target feature is enabled
122122
let res = unsafe { rndr() };

0 commit comments

Comments
 (0)