From 53f1fb0b971e42190351dc838ecdd34b4dcea8ad Mon Sep 17 00:00:00 2001 From: Steven Van Ingelgem Date: Thu, 12 Oct 2023 08:15:37 +0200 Subject: [PATCH] cargo fmt --- crates/polars-time/src/chunkedarray/utf8/infer.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/polars-time/src/chunkedarray/utf8/infer.rs b/crates/polars-time/src/chunkedarray/utf8/infer.rs index 3ed130147825..7ac33e85545d 100644 --- a/crates/polars-time/src/chunkedarray/utf8/infer.rs +++ b/crates/polars-time/src/chunkedarray/utf8/infer.rs @@ -232,7 +232,7 @@ impl TryFromWithUnit for DatetimeInfer { fn try_from_with_unit(value: Pattern, time_unit: Option) -> PolarsResult { let time_unit = time_unit.expect("time_unit must be provided for datetime"); - let transform = match (time_unit , value) { + let transform = match (time_unit, value) { (TimeUnit::Milliseconds, Pattern::DatetimeYMDZ) => transform_tzaware_datetime_ms, (TimeUnit::Milliseconds, _) => transform_datetime_ms, (TimeUnit::Microseconds, Pattern::DatetimeYMDZ) => transform_tzaware_datetime_us, @@ -241,9 +241,13 @@ impl TryFromWithUnit for DatetimeInfer { (TimeUnit::Nanoseconds, _) => transform_datetime_ns, }; let (pattern, patterns) = match value { - (Pattern::DatetimeDMY | Pattern::DateDMY) => (Pattern::DatetimeDMY, patterns::DATETIME_D_M_Y), - (Pattern::DatetimeYMD | Pattern::DateYMD) => (Pattern::DatetimeYMD, patterns::DATETIME_Y_M_D), - (Pattern::DatetimeYMDZ) => (Pattern::DatetimeYMDZ, patterns::DATETIME_Y_M_D_Z), + Pattern::DatetimeDMY | Pattern::DateDMY => { + (Pattern::DatetimeDMY, patterns::DATETIME_D_M_Y) + }, + Pattern::DatetimeYMD | Pattern::DateYMD => { + (Pattern::DatetimeYMD, patterns::DATETIME_Y_M_D) + }, + Pattern::DatetimeYMDZ => (Pattern::DatetimeYMDZ, patterns::DATETIME_Y_M_D_Z), }; Ok(DatetimeInfer {