LibJS/Rust: Apply lint clippy::semicolon_if_nothing_returned
This commit is contained in:
parent
671306d260
commit
3342e2c125
6 changed files with 14 additions and 14 deletions
|
|
@ -441,10 +441,10 @@ impl FunctionTable {
|
|||
if let Some(ref alias) = entry.alias {
|
||||
match alias {
|
||||
BindingEntryAlias::BindingPattern(sub) => {
|
||||
self.collect_from_pattern(sub, result)
|
||||
self.collect_from_pattern(sub, result);
|
||||
}
|
||||
BindingEntryAlias::MemberExpression(expr) => {
|
||||
self.collect_from_expression(expr, result)
|
||||
self.collect_from_expression(expr, result);
|
||||
}
|
||||
BindingEntryAlias::Identifier(_) => {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -434,10 +434,10 @@ fn dump_statement(statement: &Statement, state: &DumpState) {
|
|||
print_node(&init_state, &color_label(state, "init"));
|
||||
match init {
|
||||
ForInit::Expression(expr) => {
|
||||
dump_expression(expr, &child_state(&init_state, true))
|
||||
dump_expression(expr, &child_state(&init_state, true));
|
||||
}
|
||||
ForInit::Declaration(decl) => {
|
||||
dump_statement(decl, &child_state(&init_state, true))
|
||||
dump_statement(decl, &child_state(&init_state, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4864,7 +4864,7 @@ fn emit_compound_assignment(
|
|||
dst: dst_op,
|
||||
lhs: lhs_op,
|
||||
rhs: rhs_op,
|
||||
})
|
||||
});
|
||||
}
|
||||
AssignmentOp::AndAssignment
|
||||
| AssignmentOp::OrAssignment
|
||||
|
|
@ -8237,7 +8237,7 @@ pub fn emit_function_declaration_instantiation(
|
|||
match ident.local_type.get() {
|
||||
Some(LocalType::Variable) => generator.mark_local_initialized(local_index),
|
||||
Some(LocalType::Argument) => {
|
||||
generator.mark_argument_initialized(local_index)
|
||||
generator.mark_argument_initialized(local_index);
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1308,7 +1308,7 @@ impl Generator {
|
|||
OperandType::Register => {} // stays as-is
|
||||
OperandType::Local => op.offset_index_by(number_of_registers),
|
||||
OperandType::Constant => {
|
||||
op.offset_index_by(number_of_registers + number_of_locals)
|
||||
op.offset_index_by(number_of_registers + number_of_locals);
|
||||
}
|
||||
OperandType::Argument => op.offset_index_by(
|
||||
number_of_registers + number_of_locals + number_of_constants,
|
||||
|
|
|
|||
|
|
@ -870,16 +870,16 @@ pub unsafe extern "C" fn rust_compile_dynamic_function(
|
|||
let mut validate_src: Vec<u16> = Vec::new();
|
||||
match kind {
|
||||
ast::FunctionKind::Generator => {
|
||||
validate_src.extend_from_slice(utf16!("function* test("))
|
||||
validate_src.extend_from_slice(utf16!("function* test("));
|
||||
}
|
||||
ast::FunctionKind::Async => {
|
||||
validate_src.extend_from_slice(utf16!("async function test("))
|
||||
validate_src.extend_from_slice(utf16!("async function test("));
|
||||
}
|
||||
ast::FunctionKind::AsyncGenerator => {
|
||||
validate_src.extend_from_slice(utf16!("async function* test("))
|
||||
validate_src.extend_from_slice(utf16!("async function* test("));
|
||||
}
|
||||
ast::FunctionKind::Normal => {
|
||||
validate_src.extend_from_slice(utf16!("function test("))
|
||||
validate_src.extend_from_slice(utf16!("function test("));
|
||||
}
|
||||
}
|
||||
validate_src.extend_from_slice(parameters_slice);
|
||||
|
|
@ -1994,7 +1994,7 @@ unsafe fn extract_eval_gdi(
|
|||
&mut |name| eval_gdi_push_var_scoped_name(ctx, name.as_ptr(), name.len()),
|
||||
&mut |name| eval_gdi_push_annex_b_name(ctx, name.as_ptr(), name.len()),
|
||||
&mut |name, is_const| {
|
||||
eval_gdi_push_lexical_binding(ctx, name.as_ptr(), name.len(), is_const)
|
||||
eval_gdi_push_lexical_binding(ctx, name.as_ptr(), name.len(), is_const);
|
||||
},
|
||||
function_table,
|
||||
);
|
||||
|
|
@ -2057,7 +2057,7 @@ unsafe fn extract_script_gdi(
|
|||
&mut |name| script_gdi_push_var_scoped_name(ctx, name.as_ptr(), name.len()),
|
||||
&mut |name| script_gdi_push_annex_b_name(ctx, name.as_ptr(), name.len()),
|
||||
&mut |name, is_const| {
|
||||
script_gdi_push_lexical_binding(ctx, name.as_ptr(), name.len(), is_const)
|
||||
script_gdi_push_lexical_binding(ctx, name.as_ptr(), name.len(), is_const);
|
||||
},
|
||||
function_table,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1970,7 +1970,7 @@ impl<'a> Parser<'a> {
|
|||
),
|
||||
// C++ uses rule_start (template literal start) for NullLiteral.
|
||||
None => {
|
||||
expressions.push(self.expression(start, ExpressionKind::NullLiteral))
|
||||
expressions.push(self.expression(start, ExpressionKind::NullLiteral));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue