diff options
| author | iximeow <me@iximeow.net> | 2026-05-30 19:13:14 +0000 |
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2026-06-21 16:44:21 +0000 |
| commit | 7aef56ca320bad9d72fbddd6e334381773e23d37 (patch) | |
| tree | e57909280051d82b4b29b01f9a552808882edbbd /test/long_mode/behavior.rs | |
| parent | 2146ee62c265cd13ebcc1aaef138dd9e1aec4b72 (diff) | |
useless use of unsafe
Diffstat (limited to 'test/long_mode/behavior.rs')
| -rw-r--r-- | test/long_mode/behavior.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/long_mode/behavior.rs b/test/long_mode/behavior.rs index b6bd8c2..e3d27aa 100644 --- a/test/long_mode/behavior.rs +++ b/test/long_mode/behavior.rs @@ -9,10 +9,7 @@ mod kvm { use rand::prelude::*; fn host_decoder() -> long_mode::InstDecoder { - // Safety: it's cpuid, everything supports leaf eax=1. - let leaf1 = unsafe { - core::arch::x86_64::__cpuid(1) - }; + let leaf1 = core::arch::x86_64::__cpuid(1); match leaf1.eax { 0x00b40f40 => { // zen 5 (my 9950x) |
