From 01fabec18f6538593ac1e535cf3572249650d4a1 Mon Sep 17 00:00:00 2001 From: onyks-os <129986281+onyks-os@users.noreply.github.com> Date: Wed, 7 Oct 2026 01:25:22 +0200 Subject: [PATCH] fix: satisfy the lints added in Clippy 1.99 must_use_candidate on Client::connection, and assert_is_empty in two tests, which now compare with an empty value so a failure shows it. CI builds with the latest stable toolchain, so every pull request failed lint until this lands. Co-Authored-By: Claude Opus 5.5 Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com> --- src/dbus/client.rs | 1 + src/lib.rs | 2 +- tests/dbus.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dbus/client.rs b/src/dbus/client.rs index 8de0ba8..fbd3c73 100644 --- a/src/dbus/client.rs +++ b/src/dbus/client.rs @@ -75,6 +75,7 @@ impl Client { } /// The underlying connection. + #[must_use] pub const fn connection(&self) -> &Connection { &self.connection } diff --git a/src/lib.rs b/src/lib.rs index ea2eb70..95337a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,6 +24,6 @@ mod tests { #[test] fn version_is_not_empty() { - assert!(!VERSION.is_empty()); + assert_ne!(VERSION, ""); } } diff --git a/tests/dbus.rs b/tests/dbus.rs index 35a4a4f..99bc493 100644 --- a/tests/dbus.rs +++ b/tests/dbus.rs @@ -111,7 +111,7 @@ async fn invalid_rules_never_reach_the_daemon() { .await .unwrap_err(); assert!(matches!(err, AppError::Parse(_))); - assert!(mock.calls().is_empty()); + assert_eq!(mock.calls(), Vec::::new(), "nothing may be sent"); } #[tokio::test]