tpm: drop unnecessary cast

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2023-01-30 21:37:09 +00:00 committed by Rob Bradford
parent 2d2f356d94
commit 8e996ff2fe

View File

@ -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::<u32>() + msg_len_in) as isize;
let n = mem::size_of::<u32>() + msg_len_in;
let converted_req = msg.ptm_to_request();
debug!("converted request: {:02X?}", converted_req);
let mut buf = Vec::<u8>::with_capacity(n as usize);
let mut buf = Vec::<u8>::with_capacity(n);
buf.extend(cmd_no);
buf.extend(converted_req);