diff --git a/tpm/src/emulator.rs b/tpm/src/emulator.rs index de4aaa5dd..1fee0e01c 100644 --- a/tpm/src/emulator.rs +++ b/tpm/src/emulator.rs @@ -197,12 +197,12 @@ impl Emulator { debug!("Control Cmd to send : {:02X?}", cmd); let cmd_no = (cmd as u32).to_be_bytes(); - let n: isize = (mem::size_of::() + msg_len_in) as isize; + let n = mem::size_of::() + msg_len_in; let converted_req = msg.ptm_to_request(); debug!("converted request: {:02X?}", converted_req); - let mut buf = Vec::::with_capacity(n as usize); + let mut buf = Vec::::with_capacity(n); buf.extend(cmd_no); buf.extend(converted_req);