mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 15:39:59 -07:00
also run formatter
This commit is contained in:
committed by
Markus Unterwaditzer
parent
94289dcad5
commit
ed3072eb8e
@@ -103,17 +103,13 @@ impl DiagDevice {
|
||||
loop {
|
||||
match Self::try_new().await {
|
||||
Ok(device) => {
|
||||
info!(
|
||||
"Diag device initialization succeeded after {num_retries} retries"
|
||||
);
|
||||
info!("Diag device initialization succeeded after {num_retries} retries");
|
||||
return Ok(device);
|
||||
}
|
||||
Err(e) => {
|
||||
num_retries += 1;
|
||||
if start_time.elapsed() >= max_duration {
|
||||
error!(
|
||||
"Failed to initialize diag device after {max_duration:?}: {e}"
|
||||
);
|
||||
error!("Failed to initialize diag device after {max_duration:?}: {e}");
|
||||
return Err(e);
|
||||
}
|
||||
|
||||
@@ -343,9 +339,7 @@ fn enable_frame_readwrite(fd: i32, mode: u32) -> DiagResult<()> {
|
||||
}
|
||||
|
||||
if ret < 0 {
|
||||
let msg = format!(
|
||||
"DIAG_IOCTL_SWITCH_LOGGING ioctl failed with error code {ret}"
|
||||
);
|
||||
let msg = format!("DIAG_IOCTL_SWITCH_LOGGING ioctl failed with error code {ret}");
|
||||
return Err(DiagDeviceError::InitializationFailed(msg));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user