From af267b0e7869237cfa3cc1aaeb1b32b87b79937a Mon Sep 17 00:00:00 2001 From: Gerd Zellweger Date: Fri, 23 Aug 2019 17:29:14 -0700 Subject: Fix warnings. --- x86test/src/hypervisor/mod.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'x86test/src/hypervisor/mod.rs') diff --git a/x86test/src/hypervisor/mod.rs b/x86test/src/hypervisor/mod.rs index 177300a..2e42eba 100644 --- a/x86test/src/hypervisor/mod.rs +++ b/x86test/src/hypervisor/mod.rs @@ -2,7 +2,6 @@ use std::fs::File; use std::io; use std::io::{BufRead, BufReader, Write}; -use std::slice; use kvm::{Capability, IoDirection, Segment, System, Vcpu, VirtualMachine}; use mmap::{MemoryMap, MapOption}; @@ -19,6 +18,7 @@ pub(crate) struct PhysicalMemory { offset: usize, allocated: usize, size: usize, + #[allow(unused)] backing_memory: MemoryMap, } @@ -39,10 +39,6 @@ impl PhysicalMemory { } } - fn as_mut_slice<'a>(&'a mut self) -> &'a mut [u8] { - unsafe { slice::from_raw_parts_mut(self.backing_memory.data(), self.size) } - } - fn len(&self) -> usize { self.size } @@ -61,6 +57,7 @@ impl PhysicalMemory { pub(crate) struct TestEnvironment<'a> { sys: &'a System, + #[allow(unused)] heap: &'a mut PhysicalMemory, stack: &'a mut PhysicalMemory, vspace: VSpace<'a>, -- cgit v1.2.3