diff options
author | 2019-08-23 17:29:14 -0700 | |
---|---|---|
committer | 2019-08-23 17:29:14 -0700 | |
commit | af267b0e7869237cfa3cc1aaeb1b32b87b79937a (patch) | |
tree | 9422fa44615859d44035a93a7ce4cf254dec48a1 /x86test/src/hypervisor/mod.rs | |
parent | 46617737ffe418286a7d9fb3e3d53f032a7489e0 (diff) | |
download | rust-x86-af267b0e7869237cfa3cc1aaeb1b32b87b79937a.tar.gz rust-x86-af267b0e7869237cfa3cc1aaeb1b32b87b79937a.tar.zst rust-x86-af267b0e7869237cfa3cc1aaeb1b32b87b79937a.zip |
Fix warnings.
Diffstat (limited to 'x86test/src/hypervisor/mod.rs')
-rw-r--r-- | x86test/src/hypervisor/mod.rs | 7 |
1 files changed, 2 insertions, 5 deletions
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>, |