From a53eee26808021dc2ebfb5947b62f1afce8137ea Mon Sep 17 00:00:00 2001 From: Kould <2435992353@qq.com> Date: Mon, 29 Jan 2024 03:06:21 +0800 Subject: [PATCH] code fmt --- benchmarks/query_benchmark.rs | 8 +++++--- examples/hello_world.rs | 2 +- src/db.rs | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/benchmarks/query_benchmark.rs b/benchmarks/query_benchmark.rs index 7cad82f1..c899b7e3 100644 --- a/benchmarks/query_benchmark.rs +++ b/benchmarks/query_benchmark.rs @@ -1,10 +1,10 @@ use criterion::{criterion_group, criterion_main, Criterion}; -use indicatif::{ProgressBar, ProgressStyle}; -use itertools::Itertools; use fnck_sql::db::{Database, DatabaseError}; use fnck_sql::execution::volcano; use fnck_sql::storage::kip::KipStorage; use fnck_sql::storage::Storage; +use indicatif::{ProgressBar, ProgressStyle}; +use itertools::Itertools; use sqlite::Error; use std::cell::RefCell; use std::fs; @@ -17,7 +17,9 @@ const QUERY_BENCH_SQLITE_PATH: &'static str = "./sqlite_bench"; const TABLE_ROW_NUM: u64 = 2_00_000; async fn init_fncksql_query_bench() -> Result<(), DatabaseError> { - let database = Database::with_kipdb(QUERY_BENCH_FNCK_SQL_PATH).await.unwrap(); + let database = Database::with_kipdb(QUERY_BENCH_FNCK_SQL_PATH) + .await + .unwrap(); database .run("create table t1 (c1 int primary key, c2 int)") .await?; diff --git a/examples/hello_world.rs b/examples/hello_world.rs index 33a02d31..5f0d091c 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -1,9 +1,9 @@ -use itertools::Itertools; use fnck_sql::db::{Database, DatabaseError}; use fnck_sql::implement_from_tuple; use fnck_sql::types::tuple::Tuple; use fnck_sql::types::value::DataValue; use fnck_sql::types::LogicalType; +use itertools::Itertools; #[derive(Default, Debug, PartialEq)] struct MyStruct { diff --git a/src/db.rs b/src/db.rs index 6964568e..7b5671e7 100644 --- a/src/db.rs +++ b/src/db.rs @@ -693,7 +693,9 @@ mod test { let _ = fnck_sql.run_on_query("truncate t1", query_execute).await?; println!("drop t1:"); - let _ = fnck_sql.run_on_query("drop table t1", query_execute).await?; + let _ = fnck_sql + .run_on_query("drop table t1", query_execute) + .await?; println!("decimal:"); let tuples_decimal = fnck_sql