Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
niebayes committed Jan 9, 2025
1 parent 6805093 commit 3752070
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions datafusion/physical-expr-common/src/physical_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ pub trait DynEq {

impl<T: Eq + Any> DynEq for T {
fn dyn_eq(&self, other: &dyn Any) -> bool {
other
.downcast_ref::<Self>()
.map_or(false, |other| other == self)
other.downcast_ref::<Self>() == Some(self)
}
}

Expand Down
6 changes: 3 additions & 3 deletions datafusion/physical-expr-common/src/sort_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ impl PhysicalSortRequirement {
/// Returns whether this requirement is equal or more specific than `other`.
pub fn compatible(&self, other: &PhysicalSortRequirement) -> bool {
self.expr.eq(&other.expr)
&& other.options.map_or(true, |other_opts| {
self.options.map_or(false, |opts| opts == other_opts)
})
&& other
.options
.map_or(true, |other_opts| self.options == Some(other_opts))
}

#[deprecated(since = "43.0.0", note = "use LexRequirement::from_lex_ordering")]
Expand Down

0 comments on commit 3752070

Please sign in to comment.