Skip to content

Commit

Permalink
update err → polars_bail
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie committed Nov 8, 2024
1 parent dd53f4e commit b3122f0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/polars-core/src/chunked_array/temporal/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ impl DurationChunked {
});
Ok(out)
},
_ => Err(PolarsError::InvalidOperation(
format!("format {:?} not supported for Duration type (expected one of 'iso' or 'polars')", format).into(),
)),
_ => {
polars_bail!(
InvalidOperation: "format {:?} not supported for Duration type (expected one of 'iso' or 'polars')",
format
)
},
}
}

Expand Down

0 comments on commit b3122f0

Please sign in to comment.