diag_device: minor fixup

This commit is contained in:
Will Greenberg
2024-01-02 16:14:10 -08:00
parent 20c6e9bf09
commit 06efa2c114

View File

@@ -66,12 +66,9 @@ pub struct DiagDevice {
impl DiagReader for DiagDevice {
fn get_next_messages_container(&mut self) -> DiagResult<MessagesContainer> {
let mut bytes_read;
loop {
let mut bytes_read = 0;
while bytes_read == 0 {
bytes_read = self.file.read(&mut self.read_buf)?;
if bytes_read > 0 {
break;
}
}
if let Some(debug_file) = self.debug_file.as_mut() {
let debug_block = DebugFileBlock {