From a689ee2bb2f97f75aa291ec405ec8ca45d63d761 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Sat, 15 Aug 2026 22:54:11 +0800 Subject: [PATCH] refactor: say why the clippy allows are there, and drop the one that is not MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sixteen `#[allow(clippy::…)]` in the tree; thirteen carry a comment saying why. These were the three that did not, and the reason turned out to differ for each. `spawn_once` takes eight arguments against a threshold of nine, so its `too_many_arguments` allowed nothing at all -- removed. `render_ssh_row` does trip it, at ten with `self`, and `LocalHost::new` really does hand back a `SharedHost` rather than a `Self`; both now say so. Removing all three first and reading what came back is what separated them, and it needed two passes: clippy stops at the first crate that fails, so tty7-core's error hid settings.rs's until it was fixed. A single clean run is not evidence about anything downstream of the first failure. --- crates/tty7-core/src/host/local.rs | 4 ++++ src/terminal/remote.rs | 1 - src/ui/settings.rs | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/tty7-core/src/host/local.rs b/crates/tty7-core/src/host/local.rs index 669b67ee..d40aa93d 100644 --- a/crates/tty7-core/src/host/local.rs +++ b/crates/tty7-core/src/host/local.rs @@ -64,6 +64,10 @@ pub struct LocalHost { } impl LocalHost { + // Hands back the `SharedHost` rather than a bare `LocalHost` because that + // is the only shape anything uses one in: a host is reached through + // `Arc`, and a caller given the struct would have to wrap it + // itself, every time, to do anything at all. #[allow(clippy::new_ret_no_self)] pub fn new() -> SharedHost { Arc::new(LocalHost { diff --git a/src/terminal/remote.rs b/src/terminal/remote.rs index a6e4523b..40874350 100644 --- a/src/terminal/remote.rs +++ b/src/terminal/remote.rs @@ -299,7 +299,6 @@ impl RemoteTerminal { } } - #[allow(clippy::too_many_arguments)] fn spawn_once( route: &PaneRoute, size: TermSize, diff --git a/src/ui/settings.rs b/src/ui/settings.rs index daa60065..d007735b 100644 --- a/src/ui/settings.rs +++ b/src/ui/settings.rs @@ -3033,6 +3033,9 @@ impl Tty7App { ) } + // Ten with `self`, against a threshold of nine. Every one is a distinct + // thing about the row being drawn, and a struct to carry them would be + // built inline at each of the call sites and read nowhere else. #[allow(clippy::too_many_arguments)] fn render_ssh_row( &self,