chore: appease clippy

This commit is contained in:
Lord-McSweeney 2023-10-19 21:12:19 -07:00 committed by Lord-McSweeney
parent 901d84b2cf
commit 043f7cdea7
1 changed files with 10 additions and 12 deletions

View File

@ -867,19 +867,17 @@ impl<'gc> TObject<'gc> for ClassObject<'gc> {
let func = Executable::from_method(call_handler, scope, None, Some(self));
func.exec(receiver, arguments, activation, self.into())
} else if arguments.len() == 1 {
arguments[0].coerce_to_type(activation, self.inner_class_definition())
} else {
if arguments.len() == 1 {
arguments[0].coerce_to_type(activation, self.inner_class_definition())
} else {
Err(Error::AvmError(argument_error(
activation,
&format!(
"Error #1112: Argument count mismatch on class coercion. Expected 1, got {}.",
arguments.len()
),
1112,
)?))
}
Err(Error::AvmError(argument_error(
activation,
&format!(
"Error #1112: Argument count mismatch on class coercion. Expected 1, got {}.",
arguments.len()
),
1112,
)?))
}
}