chore: Remove explicit clones in boolean

This commit is contained in:
EmperorBale 2021-12-06 17:03:08 -08:00 committed by Adrian Wielgosik
parent 60fc4cd0c0
commit 96eb14fdab
1 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ fn to_string<'gc>(
) -> Result<Value<'gc>, Error> {
if let Some(this) = this {
if let Some(this) = this.as_primitive() {
match this.clone() {
match *this {
Value::Bool(true) => return Ok("true".into()),
Value::Bool(false) => return Ok("false".into()),
_ => {}
@ -114,7 +114,7 @@ fn value_of<'gc>(
) -> Result<Value<'gc>, Error> {
if let Some(this) = this {
if let Some(this) = this.as_primitive() {
return Ok(this.clone());
return Ok(*this);
}
}