Skip to content

Commit

Permalink
chore: Fix new rust check lint about std::mem::replace
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone authored and Herschel committed May 10, 2020
1 parent bac9936 commit 054e6f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/avm1/property.rs
Expand Up @@ -6,7 +6,6 @@ use crate::avm1::return_value::ReturnValue;
use crate::avm1::{Avm1, Error, Object, UpdateContext, Value};
use core::fmt;
use enumset::{EnumSet, EnumSetType};
use std::mem::replace;

/// Attributes of properties in the AVM runtime.
/// The order is significant and should match the order used by `object::as_set_prop_flags`.
Expand Down Expand Up @@ -74,7 +73,7 @@ impl<'gc> Property<'gc> {
value, attributes, ..
} => {
if !attributes.contains(ReadOnly) {
replace::<Value<'gc>>(value, new_value.into());
*value = new_value.into();
}

Ok(Value::Undefined.into())
Expand Down

0 comments on commit 054e6f1

Please sign in to comment.