From 173776fb52f3d06e242f2b9b56c7b520052c37c8 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Thu, 21 May 2026 09:40:17 +0200 Subject: [PATCH] =?UTF-8?q?Behebe=20Warnung=20=C3=BCber=20ungenutzte=20log?= =?UTF-8?q?ische=20Operation=20in=20DirectorWorker:=20=C3=84ndere=20die=20?= =?UTF-8?q?Bedingung=20f=C3=BCr=20den=20Transportstart,=20um=20das=20Ergeb?= =?UTF-8?q?nis=20der=20Funktion=20zu=20ignorieren=20und=20die=20Lesbarkeit?= =?UTF-8?q?=20zu=20verbessern.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_output.txt | 16 ++++++++++++++++ src/worker/director.rs | 5 +++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 build_output.txt diff --git a/build_output.txt b/build_output.txt new file mode 100644 index 0000000..90922d3 --- /dev/null +++ b/build_output.txt @@ -0,0 +1,16 @@ + Compiling YpDaemon v0.5.0 (/mnt/share/torsten/Programs/ypdaemon) +warning: unused logical operation that must be used + --> src/worker/director.rs:294:13 + | +294 | / director.may_start_transport +295 | | && self.start_transports_stub(&director).is_err(); + | |_________________________________________________________________^ the logical operation produces a value + | + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default +help: use `let _ = ...` to ignore the resulting value + | +294 | let _ = director.may_start_transport + | +++++++ + +warning: `YpDaemon` (bin "YpDaemon") generated 1 warning + Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.01s diff --git a/src/worker/director.rs b/src/worker/director.rs index 7a73005..549fda0 100644 --- a/src/worker/director.rs +++ b/src/worker/director.rs @@ -291,8 +291,9 @@ impl DirectorWorker { if director.may_produce { self.start_productions(&director)?; } - if director.may_start_transport - && self.start_transports_stub(&director).is_err() {} + if director.may_start_transport { + let _ = self.start_transports_stub(&director); + } if director.may_sell { eprintln!( "[DirectorWorker] Starte Verkaufsprüfung für Director {} (branch_id={})",