From 4d2cc2a3a7dc5b5922f1c6ce5fd7c609cefa936c Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 15 Jul 2026 13:16:32 +0200 Subject: [PATCH] fix(host): appease clippy type_complexity on TritonTransport::service (CI -D warnings) Co-Authored-By: Claude Fable 5 --- crates/punktfunk-host/src/inject/linux/steam_controller2.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/punktfunk-host/src/inject/linux/steam_controller2.rs b/crates/punktfunk-host/src/inject/linux/steam_controller2.rs index 78d58fae..30612b8f 100644 --- a/crates/punktfunk-host/src/inject/linux/steam_controller2.rs +++ b/crates/punktfunk-host/src/inject/linux/steam_controller2.rs @@ -238,6 +238,10 @@ pub enum TritonTransport { Uhid(TritonPad), } +/// One transport `service()` pass: Steam's latest rumble `(left, right)` plus the raw +/// `(kind, payload)` reports it wrote since the last pass. +type TritonServiced = (Option<(u16, u16)>, Vec<(u8, Vec)>); + impl TritonTransport { fn write_state(&mut self, st: &TritonState) { match self { @@ -249,7 +253,7 @@ impl TritonTransport { } /// `(rumble, raw reports)` Steam wrote since the last pass. - fn service(&mut self) -> (Option<(u16, u16)>, Vec<(u8, Vec)>) { + fn service(&mut self) -> TritonServiced { match self { TritonTransport::Usbip(u) => { let fb = u.service();