Skip to content

Commit

Permalink
chore: fix some clippy errors & add clippy.toml (#658)
Browse files Browse the repository at this point in the history
* chore: fix some clippy errors & add clippy.toml

* chore: add newline for clippy.toml
  • Loading branch information
ShiKaiWi authored Feb 21, 2023
1 parent 3865c1b commit ce9fa87
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ check-license:
cd $(DIR); sh scripts/check-license.sh

clippy:
cd $(DIR); cargo clippy --all-targets --all-features --workspace -- -D warnings \
-A clippy::result_large_err -A clippy::box_default -A clippy::extra-unused-lifetimes \
-A clippy::only-used-in-recursion
cd $(DIR); cargo clippy --all-targets --all-features --workspace -- -D warnings

# test with address sanitizer
asan-test:
Expand Down
4 changes: 2 additions & 2 deletions analytic_engine/src/sst/parquet/meta_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,10 @@ mod tests {
let parquet_filter = ParquetFilter {
row_group_filters: vec![
RowGroupFilter {
column_filters: vec![None, Some(Box::new(Xor8Filter::default()))],
column_filters: vec![None, Some(Box::<Xor8Filter>::default() as _)],
},
RowGroupFilter {
column_filters: vec![Some(Box::new(Xor8Filter::default())), None],
column_filters: vec![Some(Box::<Xor8Filter>::default() as _), None],
},
],
};
Expand Down
1 change: 1 addition & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
large-error-threshold = 1024
1 change: 1 addition & 0 deletions query_engine/src/logical_optimizer/type_conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use log::debug;
pub struct TypeConversion;

impl OptimizerRule for TypeConversion {
#[allow(clippy::only_used_in_recursion)]
fn try_optimize(
&self,
plan: &LogicalPlan,
Expand Down
2 changes: 1 addition & 1 deletion sql/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ fn parse_column(col: &ColumnDef) -> Result<ColumnSchema> {
}

// Ensure default value option of columns are valid.
fn ensure_column_default_value_valid<'a, P: MetaProvider>(
fn ensure_column_default_value_valid<P: MetaProvider>(
columns: &[ColumnSchema],
meta_provider: &ContextProviderAdapter<'_, P>,
) -> Result<()> {
Expand Down

0 comments on commit ce9fa87

Please sign in to comment.