Skip to content

Commit

Permalink
refactor: deprecate too-simple helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Mar 14, 2024
1 parent df783a0 commit bf8adf2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion triton-vm/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ impl Display for LabelledInstruction {
}

/// Helps printing instructions with their labels.
#[deprecated(
since = "0.39.0",
note = "use `.iter().join(\"\\n\")` directly instead"
)]
pub fn stringify_instructions(instructions: &[LabelledInstruction]) -> String {
instructions.iter().join("\n")
}
Expand Down Expand Up @@ -1006,7 +1010,7 @@ mod tests {
#[test]
fn stringify_some_instructions() {
let instructions = triton_asm!(push 3 invert push 2 mul push 1 add write_io 1 halt);
let code = stringify_instructions(&instructions);
let code = instructions.iter().join("\n");
println!("{code}");
}

Expand Down

0 comments on commit bf8adf2

Please sign in to comment.