From e980885bbc6a32dedfd3d58ea204c846de2e4eff Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Thu, 28 Nov 2024 19:12:41 +0800 Subject: [PATCH] clippy --- src/backend/query_builder.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/backend/query_builder.rs b/src/backend/query_builder.rs index 7bf29b55..f2465fe3 100644 --- a/src/backend/query_builder.rs +++ b/src/backend/query_builder.rs @@ -471,12 +471,9 @@ pub trait QueryBuilder: None => {} }; - match &select_expr.alias { - Some(alias) => { - write!(sql, " AS ").unwrap(); - alias.prepare(sql.as_writer(), self.quote()); - } - None => {} + if let Some(alias) = &select_expr.alias { + write!(sql, " AS ").unwrap(); + alias.prepare(sql.as_writer(), self.quote()); }; }