diff --git a/app/Cargo.toml b/app/Cargo.toml index 2338b09..7aff1ad 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polka-run" -version = "0.4.0" +version = "0.5.0" edition = "2021" [lib] diff --git a/app/src/disassembler.rs b/app/src/disassembler.rs index 1c21151..95be04c 100644 --- a/app/src/disassembler.rs +++ b/app/src/disassembler.rs @@ -261,8 +261,11 @@ pub fn Disassembler() -> impl IntoView { let size = instruction.serialize_into(&mut serialized); let hex_buffer = serialized[..size] .iter() - .map(|byte| format!("{:02X} ", byte)) - .collect::(); + .fold(String::new(), |mut acc, byte| { + use std::fmt::Write; + write!(acc, "{:02X} ", byte).expect("Failed to write to String"); + acc + }); // Extract the opcode name from the instruction let opcode_name = format!("{:?}", instruction.opcode());