Clippy fixes
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2023-04-02 12:35:49 +02:00
parent b4847d2a2c
commit eec85bb9ed
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 3 additions and 3 deletions

View File

@ -380,7 +380,7 @@ impl WebAssemblyEnvironmentData {
/// of this code. /// of this code.
#[inline(always)] #[inline(always)]
pub fn get_extern_ref_index<T: ?Sized>(&self, value: &dyn Any) -> usize { pub fn get_extern_ref_index<T: ?Sized>(&self, value: &dyn Any) -> usize {
self.get_extern_ref_from_identifier::<T>(value, false) self.get_extern_ref_from_identifier(value, false)
} }
/// Get a numeric value from any given value. This is not a true Extern Ref from WASM, as this /// Get a numeric value from any given value. This is not a true Extern Ref from WASM, as this
@ -394,7 +394,7 @@ impl WebAssemblyEnvironmentData {
for v in value { for v in value {
vec.push(self.get_extern_ref_index::<T>(v)); vec.push(self.get_extern_ref_index::<T>(v));
} }
let p = self.get_extern_ref_from_identifier::<Vec<T>>(value, true); let p = self.get_extern_ref_from_identifier(value, true);
self.extern_vec_ref_lookup.write().insert(p, vec); self.extern_vec_ref_lookup.write().insert(p, vec);
p p
} }
@ -409,7 +409,7 @@ impl WebAssemblyEnvironmentData {
/// Gets the extern ref index belonging to a specific pointer. If none exists, this will create /// Gets the extern ref index belonging to a specific pointer. If none exists, this will create
/// a new one. /// a new one.
#[inline(always)] #[inline(always)]
fn get_extern_ref_from_identifier<T: ?Sized>(&self, value: &dyn Any, is_vec: bool) -> usize { fn get_extern_ref_from_identifier(&self, value: &dyn Any, is_vec: bool) -> usize {
if let Some(v) = self.extern_ref_pointers_lookup.read().get(&ExternRefLookupKey { if let Some(v) = self.extern_ref_pointers_lookup.read().get(&ExternRefLookupKey {
ptr: value as *const dyn Any, ptr: value as *const dyn Any,
is_vec, is_vec,