Fix a few warnings

This commit is contained in:
losfair 2018-11-28 13:18:23 +08:00
parent 3815eaf13a
commit b9714e1ce1
2 changed files with 2 additions and 12 deletions

View File

@ -4,9 +4,6 @@
//! are very special, the async signal unsafety of Rust's TLS implementation generally does not affect the correctness here
//! unless you have memory unsafety elsewhere in your code.
use super::sighandler::install_sighandler;
use super::webassembly::ErrorKind;
use nix::sys::signal::{Signal, SIGBUS, SIGFPE, SIGILL, SIGSEGV};
use std::cell::UnsafeCell;
extern "C" {

View File

@ -22,7 +22,6 @@ use std::slice;
use std::sync::Arc;
use super::super::common::slice::{BoundedSlice, UncheckedSlice};
use super::super::recovery;
use super::errors::ErrorKind;
use super::import_object::{ImportObject, ImportValue};
use super::math_intrinsics;
@ -481,12 +480,7 @@ impl Instance {
tables.iter().map(|table| table[..].into()).collect();
let memories_pointer: Vec<BoundedSlice<u8>> = memories
.iter()
.map(|mem| {
BoundedSlice::new(
&mem[..],
mem.current_size(),
)
})
.map(|mem| BoundedSlice::new(&mem[..], mem.current_size()))
.collect();
let globals_pointer: GlobalsSlice = globals[..].into();
@ -530,8 +524,7 @@ impl Instance {
if let Some(func_index) = self.start_func {
let func: fn(&Instance) = get_instance_function!(&self, func_index);
call_protected!(func(self))
}
else {
} else {
Ok(())
}
}