Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Apr 15, 2024
1 parent 39a11aa commit e30c381
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webserver/database/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ fn extract_static_simple_select(
let mut items = Vec::with_capacity(select_items.len());
let mut params_iter = params.iter().cloned();
for select_item in select_items {
use serde_json::Value::{Bool, Null, Number, String};
use SimpleSelectValue::{Dynamic, Static};
let sqlparser::ast::SelectItem::ExprWithAlias { expr, alias } = select_item else {
return None;
};
use serde_json::Value::*;
use SimpleSelectValue::*;
let value = match expr {
Expr::Value(Value::Boolean(b)) => Static(Bool(*b)),
Expr::Value(Value::Number(n, _)) => Static(Number(n.parse().ok()?)),
Expand Down

0 comments on commit e30c381

Please sign in to comment.