style(peer): format security hardening

Record the deterministic nightly rustfmt output for the newly added event-channel and retry code after the repository-wide formatter gate was repaired.

Test Plan:
- just fmt
- just clippy
- git diff --check
This commit is contained in:
ddidderr committed 2026-09-12 13:07:14 +02:00
1 parent f6af9b9420
commit 49f8eef7b5
10 files changed
+24 -61

No files matched your search

+6 -25
View File
@@ -14,7 +14,6 @@ use lanspread_db::{
db::GameDB,
};
use lanspread_proto::PeerEndpoint;
use crate::PeerEventSender;
use tokio_util::sync::CancellationToken;
#[cfg(test)]
@@ -25,6 +24,7 @@ use crate::{
DownloadVerificationActivity,
InstallOperation,
PeerEvent,
PeerEventSender,
StreamInstallSettings,
apply_launch_settings_to_verified_tree,
content_quarantine::ContentQuarantine,
@@ -545,11 +545,7 @@ async fn settle_download_completion(
}
/// Handles the `InstallGame` command.
pub async fn handle_install_game_command(
ctx: &Ctx,
tx_notify_ui: &PeerEventSender,
id: String,
) {
pub async fn handle_install_game_command(ctx: &Ctx, tx_notify_ui: &PeerEventSender, id: String) {
let games_folder = ctx.game_dir.read().await.clone();
spawn_install_operation(ctx, tx_notify_ui, OperationTarget::new(games_folder, id));
}
@@ -796,11 +792,7 @@ async fn select_stream_install_sources_or_finish(
}
/// Handles the `UninstallGame` command.
pub async fn handle_uninstall_game_command(
ctx: &Ctx,
tx_notify_ui: &PeerEventSender,
id: String,
) {
pub async fn handle_uninstall_game_command(ctx: &Ctx, tx_notify_ui: &PeerEventSender, id: String) {
let games_folder = ctx.game_dir.read().await.clone();
let target = OperationTarget::new(games_folder, id);
let ctx = ctx.clone();
@@ -1344,11 +1336,7 @@ fn promote_streamed_install(
Ok(())
}
fn spawn_install_operation(
ctx: &Ctx,
tx_notify_ui: &PeerEventSender,
target: OperationTarget,
) {
fn spawn_install_operation(ctx: &Ctx, tx_notify_ui: &PeerEventSender, target: OperationTarget) {
let ctx = ctx.clone();
let tx_notify_ui = tx_notify_ui.clone();
ctx.task_tracker.clone().spawn(async move {
@@ -1356,11 +1344,7 @@ fn spawn_install_operation(
});
}
async fn run_install_operation(
ctx: &Ctx,
tx_notify_ui: &PeerEventSender,
target: OperationTarget,
) {
async fn run_install_operation(ctx: &Ctx, tx_notify_ui: &PeerEventSender, target: OperationTarget) {
let id = target.game_id().to_owned();
let Some(prepared) = prepare_install_operation(ctx, tx_notify_ui, &target).await else {
return;
@@ -2342,10 +2326,7 @@ async fn handle_set_game_dir_command_with_drain_timeout(
}
/// Loads the configured local library and announces the result.
pub async fn load_local_library(
ctx: &Ctx,
tx_notify_ui: &PeerEventSender,
) -> eyre::Result<()> {
pub async fn load_local_library(ctx: &Ctx, tx_notify_ui: &PeerEventSender) -> eyre::Result<()> {
load_local_library_with_policy(ctx, tx_notify_ui, LocalLibraryEventPolicy::OnChange).await
}