From caa2199caa816087add20d5276f994b56372f6f3 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Mon, 2 Nov 2026 17:51:34 -0600 Subject: [PATCH] fix(id): restore cmd_serve's #[allow(unused_variables)] displaced by PR #3110 (#4662) PR #3110 inserted serve_groups_log_path between cmd_serve's doc comment / allow attribute and cmd_serve itself, so the allow (and the doc comment) bound to the helper, which needs neither, and cmd_serve lost the allow written for its web/port bindings. Move the helper above cmd_serve's doc block so the attribute sits on cmd_serve again. No code changes: the helper body and cmd_serve are byte-identical, only their order in the file changed. Verified on the laptop: cargo check -p id (default features = no web feature) reports zero unused-variable warnings; the #2778 / #3110 regression tests serve_groups_log_path_honours_override_and_default and the serve_group_warnings_* set pass. --- pkgs/id/src/commands/serve.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/id/src/commands/serve.rs b/pkgs/id/src/commands/serve.rs index 535e6ca08e..8d8924542b 100644 --- a/pkgs/id/src/commands/serve.rs +++ b/pkgs/id/src/commands/serve.rs @@ -791,6 +791,14 @@ impl ServeWorlds { } } +/// The group log the serve warning watcher reads: the global +/// `--groups-log` option when given, else the default file name — +/// resolved with the group commands' semantics (#2778; serve used +/// to hardcode the default and ignore the option). +fn serve_groups_log_path(path: Option) -> PathBuf { + crate::commands::group::log_path(path) +} + /// Starts the serve process. /// /// Initializes the Iroh endpoint, blob store, protocol handlers, and @@ -830,14 +838,6 @@ impl ServeWorlds { /// Prints the node ID, mode, and peer discovery status to stdout. /// Status messages go to stderr. #[allow(unused_variables)] // web/port only used with web feature -/// The group log the serve warning watcher reads: the global -/// `--groups-log` option when given, else the default file name — -/// resolved with the group commands' semantics (#2778; serve used -/// to hardcode the default and ignore the option). -fn serve_groups_log_path(path: Option) -> PathBuf { - crate::commands::group::log_path(path) -} - pub async fn cmd_serve(opts: ServeOptions) -> Result<()> { let ServeOptions { ephemeral,