Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c3051b1

Browse files
committed
Unify cygwin & horizon random impl
1 parent 268e734 commit c3051b1

File tree

4 files changed

+5
-16
lines changed

4 files changed

+5
-16
lines changed

library/std/src/random.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use crate::sys::random as sys;
3737
/// Solaris | [`arc4random_buf`](https://docs.oracle.com/cd/E88353_01/html/E37843/arc4random-3c.html)
3838
/// Vita | `arc4random_buf`
3939
/// Hermit | `read_entropy`
40-
/// Horizon | `getrandom` shim
40+
/// Horizon, Cygwin | `getrandom`
4141
/// AIX, Hurd, L4Re, QNX | `/dev/urandom`
4242
/// Redox | `/scheme/rand`
4343
/// RTEMS | [`arc4random_buf`](https://docs.rtems.org/branches/master/bsp-howto/getentropy.html)

library/std/src/sys/random/cygwin.rs

Lines changed: 0 additions & 8 deletions
This file was deleted.

library/std/src/sys/random/mod.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ cfg_if::cfg_if! {
66
} else if #[cfg(target_os = "windows")] {
77
mod windows;
88
pub use windows::fill_bytes;
9-
} else if #[cfg(target_os = "cygwin")] {
10-
mod cygwin;
11-
pub use cygwin::fill_bytes;
129
} else if #[cfg(target_vendor = "apple")] {
1310
mod apple;
1411
pub use apple::fill_bytes;
@@ -38,10 +35,10 @@ cfg_if::cfg_if! {
3835
} else if #[cfg(target_os = "hermit")] {
3936
mod hermit;
4037
pub use hermit::fill_bytes;
41-
} else if #[cfg(target_os = "horizon")] {
42-
// FIXME: add arc4random_buf to shim-3ds
43-
mod horizon;
44-
pub use horizon::fill_bytes;
38+
} else if #[cfg(any(target_os = "horizon", target_os = "cygwin"))] {
39+
// FIXME(horizon): add arc4random_buf to shim-3ds
40+
mod getrandom;
41+
pub use getrandom::fill_bytes;
4542
} else if #[cfg(any(
4643
target_os = "aix",
4744
target_os = "hurd",

0 commit comments

Comments
 (0)