mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-06-11 15:23:30 -07:00
cargo fmt pass
This commit is contained in:
@@ -54,11 +54,13 @@ pub fn update_ui(
|
||||
Err(mpsc::error::TryRecvError::Empty) => {}
|
||||
Err(e) => error!("error receiving ui update message: {e}"),
|
||||
};
|
||||
|
||||
|
||||
// Update LEDs if state changed or if 5 seconds have passed since last update
|
||||
let now = std::time::Instant::now();
|
||||
let should_update = !invisible && (state != last_state || now.duration_since(last_update) >= Duration::from_secs(5));
|
||||
|
||||
let should_update = !invisible
|
||||
&& (state != last_state
|
||||
|| now.duration_since(last_update) >= Duration::from_secs(5));
|
||||
|
||||
if should_update {
|
||||
match state {
|
||||
DisplayState::Paused => {
|
||||
@@ -80,7 +82,7 @@ pub fn update_ui(
|
||||
last_state = state;
|
||||
last_update = now;
|
||||
}
|
||||
|
||||
|
||||
tokio::time::sleep(Duration::from_secs(1)).await;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use std::io::Write;
|
||||
/// Installer for the Uz801 hotspot.
|
||||
///
|
||||
/// Installation process:
|
||||
@@ -6,7 +7,6 @@
|
||||
/// 3. Use ADB to install rayhunter files
|
||||
/// 4. Modify startup script to launch rayhunter on boot
|
||||
use std::time::Duration;
|
||||
use std::io::Write;
|
||||
|
||||
use adb_client::{ADBDeviceExt, ADBUSBDevice, RustADBError};
|
||||
use anyhow::Result;
|
||||
|
||||
Reference in New Issue
Block a user