We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2ad126 commit f80b7a9Copy full SHA for f80b7a9
vm/src/emulator/executor.rs
@@ -467,8 +467,10 @@ impl HarvardEmulator {
467
.unwrap();
468
469
// Add the public input length to the beginning of the public input.
470
- let len_bytes = (public_input.len()) as u32;
471
- let public_input_with_len = [&len_bytes.to_le_bytes()[..], public_input].concat();
+ let len_bytes = public_input.len() as u32;
+ let mut public_input_with_len = Vec::with_capacity(WORD_SIZE + public_input.len());
472
+ public_input_with_len.extend_from_slice(&len_bytes.to_le_bytes());
473
+ public_input_with_len.extend_from_slice(public_input);
474
475
let mut emulator = Self {
476
executor: Executor {
0 commit comments