From 876d78e1883a48e4ce5357e19ca796503de8fe6d Mon Sep 17 00:00:00 2001 From: Denis Nevmerzhitskii Date: Wed, 24 Mar 2021 19:09:08 +0200 Subject: [PATCH] Fix chrono-tz integration --- src/types/external/chrono_tz.rs | 4 ++-- src/types/external/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/types/external/chrono_tz.rs b/src/types/external/chrono_tz.rs index 72b4808d..86d16372 100644 --- a/src/types/external/chrono_tz.rs +++ b/src/types/external/chrono_tz.rs @@ -1,6 +1,6 @@ use chrono_tz::Tz; -use crate::{InputValueError, InputValueResult, Result, Scalar, ScalarType, Value}; +use crate::{InputValueError, InputValueResult, Scalar, ScalarType, Value}; #[Scalar(internal, name = "TimeZone")] impl ScalarType for Tz { @@ -12,6 +12,6 @@ impl ScalarType for Tz { } fn to_value(&self) -> Value { - Value::String(Tz::name(self)) + Value::String(self.name().to_owned()) } } diff --git a/src/types/external/mod.rs b/src/types/external/mod.rs index e1c5dac4..f415439a 100644 --- a/src/types/external/mod.rs +++ b/src/types/external/mod.rs @@ -13,7 +13,7 @@ mod string; #[cfg(feature = "bson")] mod bson; -#[cfg(feature = "chrono_tz")] +#[cfg(feature = "chrono-tz")] mod chrono_tz; #[cfg(feature = "chrono")] mod datetime;