From f8d0c402f0f0366210954d1e08c4afbb3e52d74b Mon Sep 17 00:00:00 2001 From: Alexander Beedie Date: Fri, 8 Nov 2024 13:03:18 +0400 Subject: [PATCH] =?UTF-8?q?update=20err=20=E2=86=92=20polars=5Fbail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../polars-core/src/chunked_array/temporal/duration.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/polars-core/src/chunked_array/temporal/duration.rs b/crates/polars-core/src/chunked_array/temporal/duration.rs index d17eb9a9df1f0..32e8b06cb3318 100644 --- a/crates/polars-core/src/chunked_array/temporal/duration.rs +++ b/crates/polars-core/src/chunked_array/temporal/duration.rs @@ -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 + ) + }, } }