From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/wasm-bindgen/tests/wasm/simple.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'vendor/wasm-bindgen/tests/wasm/simple.rs') 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(); -- cgit v1.2.3