Skip to content

Commit dfd6ab9

Browse files
committed
test: Remove unneeded unsafe blocks
1 parent 4c97eb8 commit dfd6ab9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libc-test/tests/linux_kernel_version.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ mod t {
66

77
#[test]
88
fn test_kernel_version() {
9-
assert_eq!(unsafe { libc::KERNEL_VERSION(6, 0, 0) }, 393216);
9+
assert_eq!(libc::KERNEL_VERSION(6, 0, 0), 393216);
1010
// Check that the patch level saturates
11-
assert_eq!(unsafe { libc::KERNEL_VERSION(6, 0, 255) }, 393471);
12-
assert_eq!(unsafe { libc::KERNEL_VERSION(6, 0, 256) }, 393471);
13-
assert_eq!(unsafe { libc::KERNEL_VERSION(6, 0, 300) }, 393471);
14-
assert_eq!(unsafe { libc::KERNEL_VERSION(6, 0, u32::MAX) }, 393471);
11+
assert_eq!(libc::KERNEL_VERSION(6, 0, 255), 393471);
12+
assert_eq!(libc::KERNEL_VERSION(6, 0, 256), 393471);
13+
assert_eq!(libc::KERNEL_VERSION(6, 0, 300), 393471);
14+
assert_eq!(libc::KERNEL_VERSION(6, 0, u32::MAX), 393471);
1515
}
1616
}

0 commit comments

Comments
 (0)