From 39a6df2bfe5666a17c5809c44888515ac5be0034 Mon Sep 17 00:00:00 2001 From: MechaCat02 Date: Wed, 27 May 2026 08:08:09 +0200 Subject: [PATCH] fix(picloud): use is_some_and in /auth/me test (clippy) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clippy::map_unwrap_or — drop the map().unwrap_or(false) for the flatter is_some_and(Value::is_null). Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/picloud/tests/api.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/picloud/tests/api.rs b/crates/picloud/tests/api.rs index e1da44e..dea99ad 100644 --- a/crates/picloud/tests/api.rs +++ b/crates/picloud/tests/api.rs @@ -108,7 +108,7 @@ async fn auth_me_returns_principal_with_role_and_email(pool: PgPool) { assert_eq!(body["instance_role"], "owner"); // Seeded admin has no email — must round-trip as null, not be missing. assert!( - body.get("email").map(Value::is_null).unwrap_or(false), + body.get("email").is_some_and(Value::is_null), "email should be present and null, got: {body}" ); assert!(body["id"].as_str().is_some());