Skip to content

Commit

Permalink
Clippy & fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jpschorr committed Oct 9, 2024
1 parent e2d1f49 commit 99d659e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 16 deletions.
4 changes: 2 additions & 2 deletions partiql/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ pub fn evaluate(mut plan: EvalPlan, bindings: MapBindings<Value>) -> EvalResult

#[track_caller]
#[inline]
pub fn eval_query_with_catalog<'a, 'b>(
pub fn eval_query_with_catalog<'a>(
statement: &'a str,
catalog: &'b dyn Catalog,
catalog: &dyn Catalog,
mode: EvaluationMode,
) -> Result<Evaluated, TestError<'a>> {
let parsed = parse(statement)?;
Expand Down
13 changes: 3 additions & 10 deletions partiql/tests/comparisons.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
use crate::common::{
compile, eval_query, eval_query_with_catalog, evaluate, lower, parse, TestError,
};
use crate::common::{eval_query, TestError};
use assert_matches::assert_matches;
use partiql_catalog::catalog::{Catalog, PartiqlCatalog};
use partiql_catalog::extension::Extension;
use partiql_eval::eval::Evaluated;
use partiql_eval::plan::EvaluationMode;
use partiql_extension_value_functions::PartiqlValueFnExtension;
use partiql_value::Value;
use std::os::macos::raw::stat;

mod common;

#[track_caller]
#[inline]
pub fn eval<'a>(statement: &'a str) {
pub fn eval(statement: &str) {
dbg!(&statement);
let res = eval_query(statement, EvaluationMode::Permissive);
assert_matches!(res, Ok(_));
Expand All @@ -29,7 +22,7 @@ pub fn eval<'a>(statement: &'a str) {

#[track_caller]
#[inline]
pub fn eval_op<'a>(op: &'a str) {
pub fn eval_op(op: &str) {
eval(&format!("1 {op} 'foo'"))
}

Expand Down
1 change: 0 additions & 1 deletion partiql/tests/extension_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use partiql_eval::env::basic::MapBindings;
use partiql_eval::error::{EvalErr, EvaluationError};
use partiql_eval::eval::{BasicContext, Evaluated};
use partiql_eval::plan::EvaluationMode;
use partiql_parser::{Parsed, ParserResult};
use partiql_value::{bag, tuple, DateTime, Value};

use crate::common::{lower, parse, TestError};
Expand Down
1 change: 0 additions & 1 deletion partiql/tests/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::common::parse;
use itertools::Itertools;
use partiql_ast::ast::{AstNode, TopLevelQuery};
use partiql_ast::pretty::ToPretty;
use partiql_parser::ParserResult;

mod common;

Expand Down
2 changes: 1 addition & 1 deletion partiql/tests/tuple_ops.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::common::{compile, eval_query_with_catalog, evaluate, lower, parse, TestError};
use crate::common::{eval_query_with_catalog, TestError};
use assert_matches::assert_matches;
use partiql_catalog::catalog::PartiqlCatalog;
use partiql_catalog::extension::Extension;
Expand Down
1 change: 0 additions & 1 deletion partiql/tests/user_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use partiql_catalog::table_fn::{
use partiql_eval::env::basic::MapBindings;
use partiql_eval::eval::BasicContext;
use partiql_eval::plan::EvaluationMode;
use partiql_parser::{Parsed, ParserResult};
use partiql_value::{bag, tuple, DateTime, Value};

use crate::common::{lower, parse, TestError};
Expand Down

0 comments on commit 99d659e

Please sign in to comment.