From 845761e498d3fdf7f65a64f43c7f2d300c46dbea Mon Sep 17 00:00:00 2001 From: gwenn Date: Wed, 11 Oct 2023 18:49:27 +0200 Subject: [PATCH] Fix clippy warning redundant_guards --- src/hooks.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hooks.rs b/src/hooks.rs index a069686..52a53a3 100644 --- a/src/hooks.rs +++ b/src/hooks.rs @@ -776,9 +776,10 @@ mod test { .unwrap(); let authorizer = move |ctx: AuthContext<'_>| match ctx.action { - AuthAction::Read { column_name, .. } if column_name == "private" => { - Authorization::Ignore - } + AuthAction::Read { + column_name: "private", + .. + } => Authorization::Ignore, AuthAction::DropTable { .. } => Authorization::Deny, AuthAction::Pragma { .. } => panic!("shouldn't be called"), _ => Authorization::Allow,