Skip to content

Commit 1c4bfb0

Browse files
committed
fixup: style
1 parent c7d713d commit 1c4bfb0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/unix/linux_like/mod.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -574,10 +574,13 @@ pub const SIGALRM: ::c_int = 14;
574574
pub const SIGTERM: ::c_int = 15;
575575

576576
const SIGEV_MAX_SIZE: usize = 64;
577-
#[cfg(target_pointer_width = "64")]
578-
const __ARCH_SIGEV_PREAMBLE_SIZE: usize = 4 * 2 + 8;
579-
#[cfg(target_pointer_width = "32")]
580-
const __ARCH_SIGEV_PREAMBLE_SIZE: usize = 4 * 2 + 4;
577+
cfg_if! {
578+
if #[cfg(target_pointer_width = "64")] {
579+
const __ARCH_SIGEV_PREAMBLE_SIZE: usize = 4 * 2 + 8;
580+
} else {
581+
const __ARCH_SIGEV_PREAMBLE_SIZE: usize = 4 * 2 + 4;
582+
}
583+
}
581584
const SIGEV_PAD_SIZE: usize = (SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / 4;
582585

583586
pub const PROT_NONE: ::c_int = 0;

0 commit comments

Comments
 (0)