Skip to content

Commit

Permalink
Merge branch 'js-api' of github.com:wasmerio/wasmer into js-api
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jul 23, 2021
2 parents e429b57 + 290358d commit 00a23f0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
3 changes: 1 addition & 2 deletions lib/js-api/src/externals/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn result_to_js(val: &Val) -> JsValue {
Val::I64(i) => JsValue::from_f64(*i as _),
Val::F32(f) => JsValue::from_f64(*f as _),
Val::F64(f) => JsValue::from_f64(*f),
_ => unimplemented!("The type is not yet supported in the JS Function API"),
val => unimplemented!("The value `{:?}` is not yet supported in the JS Function API", val),
}
}

Expand Down Expand Up @@ -145,7 +145,6 @@ impl Function {
let binded_func = dyn_func.bind1(
&JsValue::UNDEFINED,
&wrapped_func,
// &JsValue::from_f64(wrapped_func as usize as f64),
);
Self {
store: store.clone(),
Expand Down
6 changes: 0 additions & 6 deletions lib/js-api/tests/externals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,6 @@ fn memory_grow() {
attempted_delta: 10.into()
})
);

// let bad_desc = MemoryType::new(Pages(15), Some(Pages(10)), false);
// let bad_result = Memory::new(&store, bad_desc);

// // assert!(matches!(bad_result, Err(MemoryError::InvalidMemory { .. })));
// assert!(bad_result.is_err());
}

#[wasm_bindgen_test]
Expand Down

0 comments on commit 00a23f0

Please sign in to comment.