Skip to content

Commit

Permalink
simplify stringification of labelled instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Sep 28, 2023
1 parent 1e414e3 commit 109ca84
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions triton-vm/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::result;
use anyhow::anyhow;
use anyhow::Result;
use get_size::GetSize;
use itertools::Itertools;
use lazy_static::lazy_static;
use serde_derive::Deserialize;
use serde_derive::Serialize;
Expand Down Expand Up @@ -60,11 +61,7 @@ impl Display for LabelledInstruction {

/// Helps printing instructions with their labels.
pub fn stringify_instructions(instructions: &[LabelledInstruction]) -> String {
instructions
.iter()
.map(|instruction| instruction.to_string())
.collect::<Vec<_>>()
.join("\n")
instructions.iter().join("\n")
}

/// A Triton VM instruction. See the
Expand Down

0 comments on commit 109ca84

Please sign in to comment.