summary refs log tree commit diff
path: root/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'x86_64')
-rw-r--r--x86_64/src/cpuid.rs2
-rw-r--r--x86_64/src/mptable.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/x86_64/src/cpuid.rs b/x86_64/src/cpuid.rs
index 0a70a21..9f76550 100644
--- a/x86_64/src/cpuid.rs
+++ b/x86_64/src/cpuid.rs
@@ -53,7 +53,7 @@ const EDX_HTT_SHIFT: u32 = 28; // Hyper Threading Enabled.
 fn filter_cpuid(cpu_id: u64, cpu_count: u64, kvm_cpuid: &mut kvm::CpuId) -> Result<()> {
     let entries = kvm_cpuid.mut_entries_slice();
 
-    for entry in entries.iter_mut() {
+    for entry in entries {
         match entry.function {
             1 => {
                 // X86 hypervisor feature
diff --git a/x86_64/src/mptable.rs b/x86_64/src/mptable.rs
index 9277840..c2def2f 100644
--- a/x86_64/src/mptable.rs
+++ b/x86_64/src/mptable.rs
@@ -89,7 +89,7 @@ fn compute_checksum<T: Copy>(v: &T) -> u8 {
     // Safe because we are only reading the bytes within the size of the `T` reference `v`.
     let v_slice = unsafe { slice::from_raw_parts(v as *const T as *const u8, mem::size_of::<T>()) };
     let mut checksum: u8 = 0;
-    for i in v_slice.iter() {
+    for i in v_slice {
         checksum = checksum.wrapping_add(*i);
     }
     checksum