mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-07-26 09:18:11 -07:00
diag_device: minor fixup
This commit is contained in:
+2
-5
@@ -66,12 +66,9 @@ pub struct DiagDevice {
|
|||||||
|
|
||||||
impl DiagReader for DiagDevice {
|
impl DiagReader for DiagDevice {
|
||||||
fn get_next_messages_container(&mut self) -> DiagResult<MessagesContainer> {
|
fn get_next_messages_container(&mut self) -> DiagResult<MessagesContainer> {
|
||||||
let mut bytes_read;
|
let mut bytes_read = 0;
|
||||||
loop {
|
while bytes_read == 0 {
|
||||||
bytes_read = self.file.read(&mut self.read_buf)?;
|
bytes_read = self.file.read(&mut self.read_buf)?;
|
||||||
if bytes_read > 0 {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if let Some(debug_file) = self.debug_file.as_mut() {
|
if let Some(debug_file) = self.debug_file.as_mut() {
|
||||||
let debug_block = DebugFileBlock {
|
let debug_block = DebugFileBlock {
|
||||||
|
|||||||
Reference in New Issue
Block a user