Skip to content

Commit

Permalink
remove nested branch
Browse files Browse the repository at this point in the history
  • Loading branch information
nameexhaustion committed Oct 14, 2024
1 parent 8d323ed commit 7cad3e2
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions crates/polars-core/src/series/arithmetic/borrowed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -629,14 +629,12 @@ impl Div for &Series {
| (_, Time)
| (_, Date)
| (_, Datetime(_, _)) => polars_bail!(opq = div, self.dtype(), rhs.dtype()),
_ => match (self.dtype(), rhs.dtype()) {
(DataType::List(_), _) | (_, DataType::List(_)) => {
list_borrowed::NumericListOp::Div.execute(self, rhs)
},
_ => {
let (lhs, rhs) = coerce_lhs_rhs(self, rhs)?;
lhs.divide(rhs.as_ref())
},
(DataType::List(_), _) | (_, DataType::List(_)) => {
list_borrowed::NumericListOp::Div.execute(self, rhs)
},
_ => {
let (lhs, rhs) = coerce_lhs_rhs(self, rhs)?;
lhs.divide(rhs.as_ref())
},
}
}
Expand Down

0 comments on commit 7cad3e2

Please sign in to comment.