From 054e6f1ac6a46577d646366b7ad442afc150af43 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sat, 9 May 2020 16:47:46 +0200 Subject: [PATCH] chore: Fix new rust check lint about std::mem::replace --- core/src/avm1/property.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/avm1/property.rs b/core/src/avm1/property.rs index 45f894317..5c6d666b5 100644 --- a/core/src/avm1/property.rs +++ b/core/src/avm1/property.rs @@ -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`. @@ -74,7 +73,7 @@ impl<'gc> Property<'gc> { value, attributes, .. } => { if !attributes.contains(ReadOnly) { - replace::>(value, new_value.into()); + *value = new_value.into(); } Ok(Value::Undefined.into())