Skip to content

Commit b697f78

Browse files
committed
chore: apply rustfmt import ordering and whitespace cleanup
Reorder imports in websocket.rs to match rustfmt's default sorting (Connector before tungstenite). Reformat load_averages array assignment in controller.rs for line length compliance. Remove trailing blank line in store/refresh.rs.
1 parent 08f1664 commit b697f78

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

crates/unifly-api/src/websocket.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ use rustls::ClientConfig;
3737
use rustls_pki_types::CertificateDer;
3838
use serde::{Deserialize, Serialize};
3939
use tokio::sync::broadcast;
40-
use tokio_tungstenite::tungstenite::{self, ClientRequestBuilder};
4140
use tokio_tungstenite::Connector;
41+
use tokio_tungstenite::tungstenite::{self, ClientRequestBuilder};
4242
use tokio_util::sync::CancellationToken;
4343
use url::Url;
4444

crates/unifly-core/src/controller.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,8 +1563,8 @@ fn apply_device_sync(store: &DataStore, data: &serde_json::Value) {
15631563
(Some(used), Some(total)) if total > 0 => Some((used as f64 / total as f64) * 100.0),
15641564
_ => None,
15651565
};
1566-
let load_averages: [Option<f64>; 3] = ["loadavg_1", "loadavg_5", "loadavg_15"]
1567-
.map(|key| parse_f64_field(sys, key));
1566+
let load_averages: [Option<f64>; 3] =
1567+
["loadavg_1", "loadavg_5", "loadavg_15"].map(|key| parse_f64_field(sys, key));
15681568

15691569
// Uplink bandwidth: check "uplink" object or top-level fields
15701570
let uplink = data.get("uplink");

crates/unifly-core/src/store/refresh.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,4 @@ impl DataStore {
209209

210210
let _ = self.last_full_refresh.send(Some(Utc::now()));
211211
}
212-
213212
}

0 commit comments

Comments
 (0)