fix unecessary return
This commit is contained in:
committed by
Bennet Bleßmann
parent
ae3019d923
commit
495bcd73f2
@@ -324,7 +324,7 @@ impl ForeignFunctionTable {
|
|||||||
let mut pointer_args =
|
let mut pointer_args =
|
||||||
Self::build_pointer_args(&mut args, &function_impl.args, &mut self.structs)?;
|
Self::build_pointer_args(&mut args, &function_impl.args, &mut self.structs)?;
|
||||||
|
|
||||||
return unsafe {
|
unsafe {
|
||||||
macro_rules! call_and_return {
|
macro_rules! call_and_return {
|
||||||
($type:ty) => {{
|
($type:ty) => {{
|
||||||
let mut n: Box<u8> = Box::new(0);
|
let mut n: Box<u8> = Box::new(0);
|
||||||
@@ -410,7 +410,7 @@ impl ForeignFunctionTable {
|
|||||||
}
|
}
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn read_struct(
|
fn read_struct(
|
||||||
|
|||||||
@@ -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;
|
let code_index_tbl = &mut LS::machine_st(&mut self.payload).arena.code_index_tbl;
|
||||||
|
|
||||||
if module_name == atom!("user") {
|
if module_name == atom!("user") {
|
||||||
return *self
|
*self
|
||||||
.wam_prelude
|
.wam_prelude
|
||||||
.indices
|
.indices
|
||||||
.code_dir
|
.code_dir
|
||||||
.entry(key)
|
.entry(key)
|
||||||
.or_insert_with(|| CodeIndex::new(IndexPtr::undefined(), code_index_tbl));
|
.or_insert_with(|| CodeIndex::new(IndexPtr::undefined(), code_index_tbl))
|
||||||
} else {
|
} else {
|
||||||
self.get_or_insert_local_code_index(module_name, key)
|
self.get_or_insert_local_code_index(module_name, key)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -959,8 +959,8 @@ impl<'a, R: CharRead> Lexer<'a, R> {
|
|||||||
))))
|
))))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Ok(NumberToken::Number(n)) => return Ok(Token::Literal(n.to_literal())),
|
Ok(NumberToken::Number(n)) => Ok(Token::Literal(n.to_literal())),
|
||||||
Err(e) => return Err(e),
|
Err(e) => Err(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user