chore: Fix `clippy::uninlined_format_args` for `avm_debug!`
Though this is not currently enforced by Clippy.
This commit is contained in:
parent
bd9078addf
commit
14747f26fd
|
@ -259,7 +259,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
|
|||
this: Value<'gc>,
|
||||
callee: Option<Object<'gc>>,
|
||||
) -> 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 {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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: {} = <out-of-bounds register #{}>",
|
||||
register_name,
|
||||
register
|
||||
"Debug: {register_name} = <out-of-bounds register #{register}>",
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
@ -3218,7 +3216,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
|
|||
) -> Result<FrameControl<'gc>, 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<FrameControl<'gc>, Error<'gc>> {
|
||||
avm_debug!(self.avm2(), "Line: {}", line_num);
|
||||
avm_debug!(self.avm2(), "Line: {line_num}");
|
||||
|
||||
Ok(FrameControl::Continue)
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue