Skip to content

Commit a44d3de

Browse files
authored
Clean-up some clippy and rust warnings (#578)
1 parent 241f74c commit a44d3de

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

partiql-ast/src/ast/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ pub enum Expr {
417417
Call(AstNode<Call>),
418418
CallAgg(AstNode<CallAgg>),
419419
/// <expr> MATCH <graph_pattern>
420-
GraphMatch(AstNode<GraphMatch>),
420+
GraphMatch(Box<AstNode<GraphMatch>>),
421421

422422
/// Query, e.g. `UNION` | `EXCEPT` | `INTERSECT` | `SELECT` and their parts.
423423
Query(AstNode<Query>),

partiql-eval/src/plan.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,8 @@ impl<'c> EvaluatorPlanner<'c> {
498498

499499
("pattern expr", expr)
500500
}
501-
ValueExpr::GraphMatch(GraphMatchExpr { value, pattern }) => {
502-
//
501+
ValueExpr::GraphMatch(graph_match) => {
502+
let GraphMatchExpr { value, pattern } = graph_match.as_ref();
503503
let args = plan_args(&[value]);
504504
let expr = match self.plan_graph_plan::<{ STRICT }>(pattern) {
505505
Ok(pattern) => EvalGraphMatch::new(pattern).bind::<{ STRICT }>(args),

partiql-logical-planner/src/lower.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,10 +1986,10 @@ impl<'ast> Visitor<'ast> for AstToLogical<'_> {
19861986
);
19871987
let graph_reference = Box::new(graph_reference.unwrap());
19881988

1989-
self.push_vexpr(ValueExpr::GraphMatch(GraphMatchExpr {
1989+
self.push_vexpr(ValueExpr::GraphMatch(Box::new(GraphMatchExpr {
19901990
value: graph_reference,
19911991
pattern,
1992-
}));
1992+
})));
19931993
Traverse::Continue
19941994
}
19951995
Err(e) => {

partiql-logical/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ pub enum ValueExpr {
473473
NullIfExpr(NullIfExpr),
474474
CoalesceExpr(CoalesceExpr),
475475
Call(CallExpr),
476-
GraphMatch(GraphMatchExpr),
476+
GraphMatch(Box<GraphMatchExpr>),
477477
}
478478

479479
/// Represents a `PartiQL` literal value.

partiql-parser/src/parse/partiql.lalrpop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ ParenGraphMatch: ast::Expr = {
358358

359359
GraphMatch: ast::Expr = {
360360
<lo:@L> <expr:ExprQuery> "MATCH" <pattern:GraphPattern> <shape:GraphTableShape> <hi:@R>
361-
=> ast::Expr::GraphMatch(state.node(ast::GraphMatch{expr, pattern, shape}, lo..hi)),
361+
=> ast::Expr::GraphMatch(Box::new(state.node(ast::GraphMatch{expr, pattern, shape}, lo..hi))),
362362
}
363363

364364
GraphTableShape: ast::GraphTableShape = {

partiql-value/src/value.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ impl Datum<Value> for Value {
280280
}
281281

282282
#[inline]
283-
#[must_use]
284283
fn is_sequence(&self) -> bool {
285284
match self {
286285
Value::List(_) => true,
@@ -291,7 +290,6 @@ impl Datum<Value> for Value {
291290
}
292291

293292
#[inline]
294-
#[must_use]
295293
fn is_ordered(&self) -> bool {
296294
match self {
297295
Value::List(_) => true,

0 commit comments

Comments
 (0)