We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unsafe
1 parent 4c97eb8 commit dfd6ab9Copy full SHA for dfd6ab9
libc-test/tests/linux_kernel_version.rs
@@ -6,11 +6,11 @@ mod t {
6
7
#[test]
8
fn test_kernel_version() {
9
- assert_eq!(unsafe { libc::KERNEL_VERSION(6, 0, 0) }, 393216);
+ assert_eq!(libc::KERNEL_VERSION(6, 0, 0), 393216);
10
// 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);
+ assert_eq!(libc::KERNEL_VERSION(6, 0, 255), 393471);
+ assert_eq!(libc::KERNEL_VERSION(6, 0, 256), 393471);
+ assert_eq!(libc::KERNEL_VERSION(6, 0, 300), 393471);
+ assert_eq!(libc::KERNEL_VERSION(6, 0, u32::MAX), 393471);
15
}
16
0 commit comments