fix: string literals with format args not in format! (#12354)

This commit is contained in:
RoloEdits 2024-12-28 05:44:16 -08:00 committed by GitHub
parent a5a7cff311
commit 19c91dfb80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -518,15 +518,16 @@ pub fn dap_variables(cx: &mut Context) {
Some(thread_frame) => thread_frame, Some(thread_frame) => thread_frame,
None => { None => {
cx.editor cx.editor
.set_error("Failed to get stack frame for thread: {thread_id}"); .set_error(format!("Failed to get stack frame for thread: {thread_id}"));
return; return;
} }
}; };
let stack_frame = match thread_frame.get(frame) { let stack_frame = match thread_frame.get(frame) {
Some(stack_frame) => stack_frame, Some(stack_frame) => stack_frame,
None => { None => {
cx.editor cx.editor.set_error(format!(
.set_error("Failed to get stack frame for thread {thread_id} and frame {frame}."); "Failed to get stack frame for thread {thread_id} and frame {frame}."
));
return; return;
} }
}; };