Skip to content

Commit

Permalink
chore: appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-McSweeney authored and Lord-McSweeney committed Feb 3, 2024
1 parent e6ccb0e commit ef23851
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions core/src/avm2/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,10 +940,8 @@ fn optimize<'gc>(
};

let stack_value = stack.pop();
if resolved_type.is_some() {
if matches!(stack_value, Some(ValueType::Null)) {
*op = Op::Nop;
}
if resolved_type.is_some() && matches!(stack_value, Some(ValueType::Null)) {
*op = Op::Nop;
}

if let Some(resolved_type) = resolved_type {
Expand Down
2 changes: 1 addition & 1 deletion core/src/avm2/vtable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl<'gc> VTable<'gc> {
activation: &mut Activation<'_, 'gc>,
) -> Result<Value<'gc>, Error<'gc>> {
// Drop the `write()` guard, as 'slot_class.coerce' may need to access this vtable.
let mut slot_class = { self.0.read().slot_classes[slot_id as usize].clone() };
let mut slot_class = { self.0.read().slot_classes[slot_id as usize] };

let (value, changed) = slot_class.coerce(activation, value)?;

Expand Down

0 comments on commit ef23851

Please sign in to comment.