mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-12 05:18:43 +00:00
Fix errors from "make lint"
This commit is contained in:
@@ -562,7 +562,7 @@ pub fn emscripten_call_main(
|
||||
.get::<Function>(function_name)
|
||||
.map_err(|e| RuntimeError::new(e.to_string()))?;
|
||||
let num_params = main_func.ty(&env).params().len();
|
||||
let _result = match num_params {
|
||||
match num_params {
|
||||
2 => {
|
||||
let mut new_args = vec![path];
|
||||
new_args.extend(args);
|
||||
|
||||
@@ -21,10 +21,7 @@ impl VarArgs {
|
||||
// pub fn getStr<'a>(&mut self, ctx: &mut Ctx) -> &'a CStr {
|
||||
pub fn get_str(&mut self, ctx: &FunctionEnvMut<EmEnv>) -> *const c_char {
|
||||
let ptr_addr: u32 = self.get(ctx);
|
||||
let ptr =
|
||||
emscripten_memory_pointer!(ctx.data().memory_view(0, &ctx), ptr_addr) as *const c_char;
|
||||
ptr
|
||||
// unsafe { CStr::from_ptr(ptr) }
|
||||
emscripten_memory_pointer!(ctx.data().memory_view(0, &ctx), ptr_addr) as *const c_char
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user