diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
commit | dc0db358abe19481e475e10c32149b53370f1a1c (patch) | |
tree | ab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/wasm-bindgen/tests/wasm/simple.rs | |
parent | Releasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/wasm-bindgen/tests/wasm/simple.rs')
-rw-r--r-- | vendor/wasm-bindgen/tests/wasm/simple.rs | 9 |
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(); |