aboutsummaryrefslogtreecommitdiff
path: root/x86test/src/hypervisor/mod.rs
diff options
context:
space:
mode:
authorGravatar Gerd Zellweger <mail@gerdzellweger.com> 2019-08-23 17:29:14 -0700
committerGravatar Gerd Zellweger <mail@gerdzellweger.com> 2019-08-23 17:29:14 -0700
commitaf267b0e7869237cfa3cc1aaeb1b32b87b79937a (patch)
tree9422fa44615859d44035a93a7ce4cf254dec48a1 /x86test/src/hypervisor/mod.rs
parent46617737ffe418286a7d9fb3e3d53f032a7489e0 (diff)
downloadrust-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.rs7
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>,