chore: Fix new rust check lint about std::mem::replace

This commit is contained in:
Nathan Adams 2020-05-09 16:47:46 +02:00 committed by Mike Welsh
parent bac99368be
commit 054e6f1ac6
1 changed files with 1 additions and 2 deletions

View File

@ -6,7 +6,6 @@ use crate::avm1::return_value::ReturnValue;
use crate::avm1::{Avm1, Error, Object, UpdateContext, Value}; use crate::avm1::{Avm1, Error, Object, UpdateContext, Value};
use core::fmt; use core::fmt;
use enumset::{EnumSet, EnumSetType}; use enumset::{EnumSet, EnumSetType};
use std::mem::replace;
/// Attributes of properties in the AVM runtime. /// Attributes of properties in the AVM runtime.
/// The order is significant and should match the order used by `object::as_set_prop_flags`. /// The order is significant and should match the order used by `object::as_set_prop_flags`.
@ -74,7 +73,7 @@ impl<'gc> Property<'gc> {
value, attributes, .. value, attributes, ..
} => { } => {
if !attributes.contains(ReadOnly) { if !attributes.contains(ReadOnly) {
replace::<Value<'gc>>(value, new_value.into()); *value = new_value.into();
} }
Ok(Value::Undefined.into()) Ok(Value::Undefined.into())