diff --git a/core/src/avm1/activation.rs b/core/src/avm1/activation.rs index fdb8ae434..3b6c06391 100644 --- a/core/src/avm1/activation.rs +++ b/core/src/avm1/activation.rs @@ -259,7 +259,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> { this: Value<'gc>, callee: Option>, ) -> Self { - avm_debug!(context.avm1, "START {}", id); + avm_debug!(context.avm1, "START {id}"); Self { context, id, @@ -282,7 +282,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> { scope: Gc<'gc, Scope<'gc>>, ) -> Activation<'b, 'gc, 'gc_context> { let id = self.id.child(name); - avm_debug!(self.context.avm1, "START {}", id); + avm_debug!(self.context.avm1, "START {id}"); Activation { id, context: self.context.reborrow(), @@ -310,7 +310,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> { id: ActivationIdentifier<'a>, base_clip: DisplayObject<'gc>, ) -> Self { - avm_debug!(context.avm1, "START {}", id); + avm_debug!(context.avm1, "START {id}"); Self { id, @@ -446,9 +446,8 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> { let action = reader.read_action()?; avm_debug!( self.context.avm1, - "({}) Action: {:?}", + "({}) Action: {action:?}", self.id.depth(), - action ); match action { diff --git a/core/src/avm1/runtime.rs b/core/src/avm1/runtime.rs index 61bc540ad..2adcfd5a4 100644 --- a/core/src/avm1/runtime.rs +++ b/core/src/avm1/runtime.rs @@ -314,7 +314,7 @@ impl<'gc> Avm1<'gc> { } pub fn push(&mut self, value: Value<'gc>) { - avm_debug!(self, "Stack push {}: {:?}", self.stack.len(), value); + avm_debug!(self, "Stack push {}: {value:?}", self.stack.len()); self.stack.push(value); } @@ -325,7 +325,7 @@ impl<'gc> Avm1<'gc> { Value::Undefined }); - avm_debug!(self, "Stack pop {}: {:?}", self.stack.len(), value); + avm_debug!(self, "Stack pop {}: {value:?}", self.stack.len()); value } diff --git a/core/src/avm2.rs b/core/src/avm2.rs index c9b93d9fa..e70ac4a07 100644 --- a/core/src/avm2.rs +++ b/core/src/avm2.rs @@ -358,7 +358,7 @@ impl<'gc> Avm2<'gc> { } } - avm_debug!(self, "Stack push {}: {:?}", self.stack.len(), value); + avm_debug!(self, "Stack push {}: {value:?}", self.stack.len()); self.stack.push(value); } @@ -372,7 +372,7 @@ impl<'gc> Avm2<'gc> { self.stack.pop().unwrap_or(Value::Undefined) }; - avm_debug!(self, "Stack pop {}: {:?}", self.stack.len(), value); + avm_debug!(self, "Stack pop {}: {value:?}", self.stack.len()); value } @@ -389,7 +389,7 @@ impl<'gc> Avm2<'gc> { Value::Undefined }); - avm_debug!(self, "Stack peek {}: {:?}", self.stack.len(), value); + avm_debug!(self, "Stack peek {}: {value:?}", self.stack.len()); value } diff --git a/core/src/avm2/activation.rs b/core/src/avm2/activation.rs index 40b43fb72..65c71b6e4 100644 --- a/core/src/avm2/activation.rs +++ b/core/src/avm2/activation.rs @@ -957,7 +957,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> { let instruction_start = reader.pos(full_data); let op = reader.read_op(); if let Ok(op) = op { - avm_debug!(self.avm2(), "Opcode: {:?}", op); + avm_debug!(self.avm2(), "Opcode: {op:?}"); let result = match op { Op::PushByte { value } => self.op_push_byte(value), @@ -3183,13 +3183,11 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> { if (register as usize) < self.local_registers.0.len() { let value = self.local_register(register as u32)?; - avm_debug!(self.avm2(), "Debug: {} = {:?}", register_name, value); + avm_debug!(self.avm2(), "Debug: {register_name} = {value:?}"); } else { avm_debug!( self.avm2(), - "Debug: {} = ", - register_name, - register + "Debug: {register_name} = ", ); } } else { @@ -3218,7 +3216,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> { ) -> Result, Error<'gc>> { let file_name = self.pool_string(&method, file_name)?; - avm_debug!(self.avm2(), "File: {}", file_name); + avm_debug!(self.avm2(), "File: {file_name}"); Ok(FrameControl::Continue) } @@ -3233,7 +3231,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> { } fn op_debug_line(&mut self, line_num: u32) -> Result, Error<'gc>> { - avm_debug!(self.avm2(), "Line: {}", line_num); + avm_debug!(self.avm2(), "Line: {line_num}"); Ok(FrameControl::Continue) } diff --git a/core/src/avm2/events.rs b/core/src/avm2/events.rs index 7a41ecaf5..632d5e250 100644 --- a/core/src/avm2/events.rs +++ b/core/src/avm2/events.rs @@ -376,9 +376,8 @@ pub fn dispatch_event_to_target<'gc>( ) -> Result<(), Error<'gc>> { avm_debug!( activation.context.avm2, - "Event dispatch: {} to {:?}", + "Event dispatch: {} to {target:?}", event.as_event().unwrap().event_type(), - target ); let dispatch_list = dispatcher .get_property(