Update to the rustfmt in rust 1.31, which is now stable.
This commit is contained in:
@@ -168,9 +168,9 @@ fn instantiate_tables(
|
||||
let subslice = &mut slice[init.offset..init.offset + init.elements.len()];
|
||||
for (i, func_idx) in init.elements.iter().enumerate() {
|
||||
let callee_sig = module.functions[*func_idx];
|
||||
let code_buf = &compilation.functions[module.defined_func_index(*func_idx).expect(
|
||||
"table element initializer with imported function not supported yet",
|
||||
)];
|
||||
let code_buf = &compilation.functions[module
|
||||
.defined_func_index(*func_idx)
|
||||
.expect("table element initializer with imported function not supported yet")];
|
||||
let type_id = sig_registry.register(callee_sig, &module.signatures[callee_sig]);
|
||||
subslice[i] = VMCallerCheckedAnyfunc {
|
||||
func_ptr: code_buf.as_ptr(),
|
||||
|
||||
@@ -114,10 +114,9 @@ pub fn invoke_by_index(
|
||||
fn_index: FuncIndex,
|
||||
args: &[Value],
|
||||
) -> Result<InvokeOutcome, String> {
|
||||
let code_buf =
|
||||
&compilation.functions[module
|
||||
.defined_func_index(fn_index)
|
||||
.expect("imported start functions not supported yet")];
|
||||
let code_buf = &compilation.functions[module
|
||||
.defined_func_index(fn_index)
|
||||
.expect("imported start functions not supported yet")];
|
||||
let sig = &module.signatures[module.functions[fn_index]];
|
||||
|
||||
let exec_code_buf = code.allocate_copy_of_slice(&code_buf)?.as_ptr();
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
|
||||
#![warn(unused_import_braces)]
|
||||
#![cfg_attr(feature = "std", deny(unstable_features))]
|
||||
#![cfg_attr(
|
||||
feature = "clippy",
|
||||
plugin(clippy(conf_file = "../../clippy.toml"))
|
||||
)]
|
||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(new_without_default, new_without_default_derive)
|
||||
|
||||
@@ -29,7 +29,8 @@ pub extern "C" fn wasmtime_f32_nearest(x: f32) -> f32 {
|
||||
|| (um == dm && {
|
||||
let h = u / 2.;
|
||||
h.floor() == h
|
||||
}) {
|
||||
})
|
||||
{
|
||||
u
|
||||
} else {
|
||||
d
|
||||
@@ -64,7 +65,8 @@ pub extern "C" fn wasmtime_f64_nearest(x: f64) -> f64 {
|
||||
|| (um == dm && {
|
||||
let h = u / 2.;
|
||||
h.floor() == h
|
||||
}) {
|
||||
})
|
||||
{
|
||||
u
|
||||
} else {
|
||||
d
|
||||
|
||||
@@ -49,7 +49,8 @@ impl LinearMemory {
|
||||
mmap.as_ptr().add(mapped_bytes),
|
||||
inaccessible_bytes,
|
||||
region::Protection::None,
|
||||
).expect("unable to make memory inaccessible");
|
||||
)
|
||||
.expect("unable to make memory inaccessible");
|
||||
}
|
||||
|
||||
Ok(Self {
|
||||
@@ -108,7 +109,8 @@ impl LinearMemory {
|
||||
new_mmap.as_ptr().add(new_bytes),
|
||||
guard_bytes,
|
||||
region::Protection::None,
|
||||
).expect("unable to make memory inaccessible");
|
||||
)
|
||||
.expect("unable to make memory inaccessible");
|
||||
}
|
||||
|
||||
let copy_len = self.mmap.len() - self.offset_guard_size;
|
||||
|
||||
@@ -61,6 +61,7 @@ impl InstanceWorld {
|
||||
self.instance.vmctx(),
|
||||
&function_name,
|
||||
args,
|
||||
).map_err(|e| e.to_string())
|
||||
)
|
||||
.map_err(|e| e.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user