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>,
|
this: Value<'gc>,
|
||||||
callee: Option<Object<'gc>>,
|
callee: Option<Object<'gc>>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
avm_debug!(context.avm1, "START {}", id);
|
avm_debug!(context.avm1, "START {id}");
|
||||||
Self {
|
Self {
|
||||||
context,
|
context,
|
||||||
id,
|
id,
|
||||||
|
@ -282,7 +282,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
|
||||||
scope: Gc<'gc, Scope<'gc>>,
|
scope: Gc<'gc, Scope<'gc>>,
|
||||||
) -> Activation<'b, 'gc, 'gc_context> {
|
) -> Activation<'b, 'gc, 'gc_context> {
|
||||||
let id = self.id.child(name);
|
let id = self.id.child(name);
|
||||||
avm_debug!(self.context.avm1, "START {}", id);
|
avm_debug!(self.context.avm1, "START {id}");
|
||||||
Activation {
|
Activation {
|
||||||
id,
|
id,
|
||||||
context: self.context.reborrow(),
|
context: self.context.reborrow(),
|
||||||
|
@ -310,7 +310,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
|
||||||
id: ActivationIdentifier<'a>,
|
id: ActivationIdentifier<'a>,
|
||||||
base_clip: DisplayObject<'gc>,
|
base_clip: DisplayObject<'gc>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
avm_debug!(context.avm1, "START {}", id);
|
avm_debug!(context.avm1, "START {id}");
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
id,
|
id,
|
||||||
|
@ -446,9 +446,8 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
|
||||||
let action = reader.read_action()?;
|
let action = reader.read_action()?;
|
||||||
avm_debug!(
|
avm_debug!(
|
||||||
self.context.avm1,
|
self.context.avm1,
|
||||||
"({}) Action: {:?}",
|
"({}) Action: {action:?}",
|
||||||
self.id.depth(),
|
self.id.depth(),
|
||||||
action
|
|
||||||
);
|
);
|
||||||
|
|
||||||
match action {
|
match action {
|
||||||
|
|
|
@ -314,7 +314,7 @@ impl<'gc> Avm1<'gc> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn push(&mut self, value: Value<'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);
|
self.stack.push(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@ impl<'gc> Avm1<'gc> {
|
||||||
Value::Undefined
|
Value::Undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
avm_debug!(self, "Stack pop {}: {:?}", self.stack.len(), value);
|
avm_debug!(self, "Stack pop {}: {value:?}", self.stack.len());
|
||||||
|
|
||||||
value
|
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);
|
self.stack.push(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ impl<'gc> Avm2<'gc> {
|
||||||
self.stack.pop().unwrap_or(Value::Undefined)
|
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
|
value
|
||||||
}
|
}
|
||||||
|
@ -389,7 +389,7 @@ impl<'gc> Avm2<'gc> {
|
||||||
Value::Undefined
|
Value::Undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
avm_debug!(self, "Stack peek {}: {:?}", self.stack.len(), value);
|
avm_debug!(self, "Stack peek {}: {value:?}", self.stack.len());
|
||||||
|
|
||||||
value
|
value
|
||||||
}
|
}
|
||||||
|
|
|
@ -957,7 +957,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
|
||||||
let instruction_start = reader.pos(full_data);
|
let instruction_start = reader.pos(full_data);
|
||||||
let op = reader.read_op();
|
let op = reader.read_op();
|
||||||
if let Ok(op) = op {
|
if let Ok(op) = op {
|
||||||
avm_debug!(self.avm2(), "Opcode: {:?}", op);
|
avm_debug!(self.avm2(), "Opcode: {op:?}");
|
||||||
|
|
||||||
let result = match op {
|
let result = match op {
|
||||||
Op::PushByte { value } => self.op_push_byte(value),
|
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() {
|
if (register as usize) < self.local_registers.0.len() {
|
||||||
let value = self.local_register(register as u32)?;
|
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 {
|
} else {
|
||||||
avm_debug!(
|
avm_debug!(
|
||||||
self.avm2(),
|
self.avm2(),
|
||||||
"Debug: {} = <out-of-bounds register #{}>",
|
"Debug: {register_name} = <out-of-bounds register #{register}>",
|
||||||
register_name,
|
|
||||||
register
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -3218,7 +3216,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
|
||||||
) -> Result<FrameControl<'gc>, Error<'gc>> {
|
) -> Result<FrameControl<'gc>, Error<'gc>> {
|
||||||
let file_name = self.pool_string(&method, file_name)?;
|
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)
|
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>> {
|
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)
|
Ok(FrameControl::Continue)
|
||||||
}
|
}
|
||||||
|
|
|
@ -376,9 +376,8 @@ pub fn dispatch_event_to_target<'gc>(
|
||||||
) -> Result<(), Error<'gc>> {
|
) -> Result<(), Error<'gc>> {
|
||||||
avm_debug!(
|
avm_debug!(
|
||||||
activation.context.avm2,
|
activation.context.avm2,
|
||||||
"Event dispatch: {} to {:?}",
|
"Event dispatch: {} to {target:?}",
|
||||||
event.as_event().unwrap().event_type(),
|
event.as_event().unwrap().event_type(),
|
||||||
target
|
|
||||||
);
|
);
|
||||||
let dispatch_list = dispatcher
|
let dispatch_list = dispatcher
|
||||||
.get_property(
|
.get_property(
|
||||||
|
|
Loading…
Reference in New Issue