chore: Remove explicit clones in boolean
This commit is contained in:
parent
60fc4cd0c0
commit
96eb14fdab
|
@ -95,7 +95,7 @@ fn to_string<'gc>(
|
||||||
) -> Result<Value<'gc>, Error> {
|
) -> Result<Value<'gc>, Error> {
|
||||||
if let Some(this) = this {
|
if let Some(this) = this {
|
||||||
if let Some(this) = this.as_primitive() {
|
if let Some(this) = this.as_primitive() {
|
||||||
match this.clone() {
|
match *this {
|
||||||
Value::Bool(true) => return Ok("true".into()),
|
Value::Bool(true) => return Ok("true".into()),
|
||||||
Value::Bool(false) => return Ok("false".into()),
|
Value::Bool(false) => return Ok("false".into()),
|
||||||
_ => {}
|
_ => {}
|
||||||
|
@ -114,7 +114,7 @@ fn value_of<'gc>(
|
||||||
) -> Result<Value<'gc>, Error> {
|
) -> Result<Value<'gc>, Error> {
|
||||||
if let Some(this) = this {
|
if let Some(this) = this {
|
||||||
if let Some(this) = this.as_primitive() {
|
if let Some(this) = this.as_primitive() {
|
||||||
return Ok(this.clone());
|
return Ok(*this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue