Skip to content

Commit

Permalink
minor: fix clippy problem in new version.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener committed Mar 9, 2023
1 parent a6b6747 commit f2ac964
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion datafusion/common/src/dfschema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ impl From<DFSchema> for SchemaRef {
}

// Hashing refers to a subset of fields considered in PartialEq.
#[allow(clippy::derive_hash_xor_eq)]
#[allow(clippy::derived_hash_with_manual_eq)]
impl Hash for DFSchema {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.fields.hash(state);
Expand Down
4 changes: 2 additions & 2 deletions datafusion/expr/src/logical_plan/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@ pub struct CreateExternalTable {
}

// Hashing refers to a subset of fields considered in PartialEq.
#[allow(clippy::derive_hash_xor_eq)]
#[allow(clippy::derived_hash_with_manual_eq)]
impl Hash for CreateExternalTable {
fn hash<H: Hasher>(&self, state: &mut H) {
self.schema.hash(state);
Expand Down Expand Up @@ -1719,7 +1719,7 @@ pub struct Analyze {
}

/// Extension operator defined outside of DataFusion
#[allow(clippy::derive_hash_xor_eq)] // see impl PartialEq for explanation
#[allow(clippy::derived_hash_with_manual_eq)] // see impl PartialEq for explanation
#[derive(Clone, Eq, Hash)]
pub struct Extension {
/// The runtime extension operator
Expand Down
2 changes: 1 addition & 1 deletion datafusion/physical-expr/src/aggregate/count_distinct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl DistinctCountAccumulator {
.values
.iter()
.next()
.map(|vals| ScalarValue::size(vals) - std::mem::size_of_val(&vals))
.map(|vals| ScalarValue::size(vals) - std::mem::size_of_val(vals))
.unwrap_or(0)
}
}
Expand Down
4 changes: 2 additions & 2 deletions datafusion/sql/src/expr/arrow_cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ impl<'a> Parser<'a> {
let data_type = self.parse_next_type()?;
// ensure that there is no trailing content
if self.tokenizer.next().is_some() {
return Err(make_error(
Err(make_error(
self.val,
&format!("checking trailing content after parsing '{data_type}'"),
));
))
} else {
Ok(data_type)
}
Expand Down

0 comments on commit f2ac964

Please sign in to comment.