Skip to content

Commit

Permalink
style: run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
JayWhite2357 authored and Dustin-Ray committed Sep 27, 2024
1 parent cdaa517 commit aa1062d
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion crates/proof-of-sql/src/base/bit/bit_distribution.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::base::{bit::make_abs_bit_mask, scalar::Scalar};
use bit_iter::BitIter;
use serde::{Deserialize, Serialize};
use core::convert::Into;
use serde::{Deserialize, Serialize};

/// Describe the distribution of bit values in a table column
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ use crate::{
},
record_batch,
};
use alloc::sync::Arc;
use arrow::{
array::{ArrayRef, BooleanArray, Decimal128Array, Float32Array, Int64Array, StringArray},
datatypes::Schema,
record_batch::RecordBatch,
};
use alloc::sync::Arc;

fn we_can_convert_between_owned_column_and_array_ref_impl(
owned_column: OwnedColumn<Curve25519Scalar>,
Expand Down
4 changes: 2 additions & 2 deletions crates/proof-of-sql/src/base/database/record_batch_utility.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use alloc::sync::Arc;
use arrow::array::{
TimestampMicrosecondArray, TimestampMillisecondArray, TimestampNanosecondArray,
TimestampSecondArray,
};
use proof_of_sql_parser::posql_time::PoSQLTimeUnit;
use alloc::sync::Arc;

/// Extension trait for Vec<T> to convert it to an Arrow array
pub trait ToArrow {
Expand Down Expand Up @@ -176,11 +176,11 @@ macro_rules! record_batch {
#[cfg(test)]
mod tests {
use crate::record_batch;
use alloc::sync::Arc;
use arrow::{
datatypes::{Field, Schema},
record_batch::RecordBatch,
};
use alloc::sync::Arc;

#[test]
fn test_record_batch_macro() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use crate::base::{map::IndexMap, scalar::Scalar};
use alloc::{rc::Rc, vec::Vec};
/**
* Adopted from arkworks
*
* See third_party/license/arkworks.LICENSE
*/
use core::cmp::max;
use alloc::{rc::Rc, vec::Vec};

/// Stores a list of products of `DenseMultilinearExtension` that is meant to be added together.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use crate::base::{
scalar::Curve25519Scalar,
};
use ark_std::UniformRand;
use num_traits::Zero;
use core::iter;
use num_traits::Zero;

#[test]
fn compute_truncated_lagrange_basis_sum_gives_correct_values_with_0_variables() {
Expand Down
2 changes: 1 addition & 1 deletion crates/proof-of-sql/src/proof_primitive/sumcheck/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ use crate::{
},
proof_primitive::sumcheck::{prove_round, ProverState, Subclaim},
};
use serde::{Deserialize, Serialize};
/**
* Adopted from arkworks
*
* See third_party/license/arkworks.LICENSE
*/
use alloc::vec::Vec;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct SumcheckProof<S: Scalar> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use crate::base::{
* See third_party/license/arkworks.LICENSE
*/
use crate::proof_primitive::sumcheck::proof::*;
use alloc::rc::Rc;
use ark_std::UniformRand;
use merlin::Transcript;
use num_traits::{One, Zero};
use alloc::rc::Rc;

#[test]
fn test_create_verify_proof() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ use crate::{
proof_exprs::{ColumnExpr, DynProofExpr, LiteralExpr},
},
};
use core::str::FromStr;
use curve25519_dalek::RistrettoPoint;
use proof_of_sql_parser::{
intermediate_decimal::IntermediateDecimal,
posql_time::{PoSQLTimeUnit, PoSQLTimeZone, PoSQLTimestamp},
utility::*,
Identifier, SelectStatement,
};
use core::str::FromStr;

fn get_column_mappings_for_testing() -> IndexMap<Identifier, ColumnRef> {
let tab_ref = "sxt.sxt_tab".parse().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion crates/proof-of-sql/src/sql/proof/proof_builder_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{
},
sql::proof::{Indexes, SumcheckSubpolynomialType},
};
use alloc::sync::Arc;
#[cfg(feature = "arrow")]
use arrow::{
array::Int64Array,
Expand All @@ -16,7 +17,6 @@ use arrow::{
};
use curve25519_dalek::RistrettoPoint;
use num_traits::{One, Zero};
use alloc::sync::Arc;

#[test]
fn we_can_compute_commitments_for_intermediate_mles_using_a_zero_offset() {
Expand Down
2 changes: 1 addition & 1 deletion crates/proof-of-sql/src/sql/proof/proof_counts.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use serde::{Deserialize, Serialize};
use core::fmt::Debug;
use serde::{Deserialize, Serialize};

/// Counters for different terms used within a proof
#[derive(Default, Debug, Clone, Copy, Serialize, Deserialize)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ use crate::{
},
sql::proof::Indexes,
};
use alloc::sync::Arc;
use arrow::{
array::{Decimal128Array, Decimal256Array, Int64Array, StringArray},
datatypes::{i256, Field, Schema},
record_batch::RecordBatch,
};
use num_traits::Zero;
use alloc::sync::Arc;

#[test]
fn we_can_convert_an_empty_provable_result_to_a_final_result() {
Expand Down

0 comments on commit aa1062d

Please sign in to comment.