fix unecessary return

This commit is contained in:
Bennet Bleßmann
2025-07-31 21:33:13 +02:00
committed by Bennet Bleßmann
parent ae3019d923
commit 495bcd73f2
3 changed files with 6 additions and 6 deletions

View File

@@ -324,7 +324,7 @@ impl ForeignFunctionTable {
let mut pointer_args =
Self::build_pointer_args(&mut args, &function_impl.args, &mut self.structs)?;
return unsafe {
unsafe {
macro_rules! call_and_return {
($type:ty) => {{
let mut n: Box<u8> = Box::new(0);
@@ -410,7 +410,7 @@ impl ForeignFunctionTable {
}
_ => unreachable!(),
}
};
}
}
fn read_struct(

View File

@@ -688,12 +688,12 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
let code_index_tbl = &mut LS::machine_st(&mut self.payload).arena.code_index_tbl;
if module_name == atom!("user") {
return *self
*self
.wam_prelude
.indices
.code_dir
.entry(key)
.or_insert_with(|| CodeIndex::new(IndexPtr::undefined(), code_index_tbl));
.or_insert_with(|| CodeIndex::new(IndexPtr::undefined(), code_index_tbl))
} else {
self.get_or_insert_local_code_index(module_name, key)
}

View File

@@ -959,8 +959,8 @@ impl<'a, R: CharRead> Lexer<'a, R> {
))))
}
},
Ok(NumberToken::Number(n)) => return Ok(Token::Literal(n.to_literal())),
Err(e) => return Err(e),
Ok(NumberToken::Number(n)) => Ok(Token::Literal(n.to_literal())),
Err(e) => Err(e),
}
}