Skip to content

Commit 88d0d31

Browse files
authored
Move 3ds selection above rdrand/js/custom fallback (#312)
This makes the big cfg_if easier to read. Signed-off-by: Joe Richey <[email protected]>
1 parent 412e0d5 commit 88d0d31

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@ cfg_if! {
251251
#[path = "espidf.rs"] mod imp;
252252
} else if #[cfg(windows)] {
253253
#[path = "windows.rs"] mod imp;
254+
} else if #[cfg(all(target_os = "horizon", target_arch = "arm"))] {
255+
// We check for target_arch = "arm" because the Nintendo Switch also
256+
// uses Horizon OS (it is aarch64).
257+
mod util_libc;
258+
#[path = "3ds.rs"] mod imp;
254259
} else if #[cfg(all(target_arch = "x86_64", target_env = "sgx"))] {
255260
#[path = "rdrand.rs"] mod imp;
256261
} else if #[cfg(all(feature = "rdrand",
@@ -259,11 +264,6 @@ cfg_if! {
259264
} else if #[cfg(all(feature = "js",
260265
target_arch = "wasm32", target_os = "unknown"))] {
261266
#[path = "js.rs"] mod imp;
262-
} else if #[cfg(all(target_os = "horizon", target_arch = "arm"))] {
263-
// We check for target_arch = "arm" because the Nintendo Switch also
264-
// uses Horizon OS (it is aarch64).
265-
mod util_libc;
266-
#[path = "3ds.rs"] mod imp;
267267
} else if #[cfg(feature = "custom")] {
268268
use custom as imp;
269269
} else if #[cfg(all(target_arch = "wasm32", target_os = "unknown"))] {

0 commit comments

Comments
 (0)