chore: appease clippy
This commit is contained in:
parent
e227576093
commit
4da708edb8
|
@ -940,11 +940,9 @@ fn optimize<'gc>(
|
||||||
};
|
};
|
||||||
|
|
||||||
let stack_value = stack.pop();
|
let stack_value = stack.pop();
|
||||||
if resolved_type.is_some() {
|
if resolved_type.is_some() && matches!(stack_value, Some(ValueType::Null)) {
|
||||||
if matches!(stack_value, Some(ValueType::Null)) {
|
|
||||||
*op = Op::Nop;
|
*op = Op::Nop;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if let Some(resolved_type) = resolved_type {
|
if let Some(resolved_type) = resolved_type {
|
||||||
stack.push_class(resolved_type);
|
stack.push_class(resolved_type);
|
||||||
|
|
|
@ -167,7 +167,7 @@ impl<'gc> VTable<'gc> {
|
||||||
activation: &mut Activation<'_, 'gc>,
|
activation: &mut Activation<'_, 'gc>,
|
||||||
) -> Result<Value<'gc>, Error<'gc>> {
|
) -> Result<Value<'gc>, Error<'gc>> {
|
||||||
// Drop the `write()` guard, as 'slot_class.coerce' may need to access this vtable.
|
// 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)?;
|
let (value, changed) = slot_class.coerce(activation, value)?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue