summaryrefslogtreecommitdiffstats
path: root/vendor/wasm-bindgen/tests/wasm/simple.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/wasm-bindgen/tests/wasm/simple.rs')
-rw-r--r--vendor/wasm-bindgen/tests/wasm/simple.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/vendor/wasm-bindgen/tests/wasm/simple.rs b/vendor/wasm-bindgen/tests/wasm/simple.rs
index 5f22b6ea9..db653847a 100644
--- a/vendor/wasm-bindgen/tests/wasm/simple.rs
+++ b/vendor/wasm-bindgen/tests/wasm/simple.rs
@@ -57,11 +57,9 @@ pub fn simple_return_and_take_bool(a: bool, b: bool) -> bool {
}
#[wasm_bindgen]
-pub fn simple_raw_pointers_work(a: *mut u32, b: *const u8) -> *const u32 {
- unsafe {
- (*a) = (*b) as u32;
- return a;
- }
+pub unsafe fn simple_raw_pointers_work(a: *mut u32, b: *const u8) -> *const u32 {
+ (*a) = (*b) as u32;
+ a
}
#[wasm_bindgen_test]
@@ -218,6 +216,7 @@ pub fn do_string_roundtrip(s: String) -> String {
}
#[wasm_bindgen_test]
+#[allow(clippy::redundant_clone)] // clone to increase heap live count
fn externref_heap_live_count() {
let x = wasm_bindgen::externref_heap_live_count();
let y = JsValue::null().clone();