diff --git a/Cargo.toml b/Cargo.toml
index d5f77c6..6d0680c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,11 +9,13 @@ repository = "https://github.com/sfackler/rust-postgres-range"
[features]
with-chrono-0_4 = ["chrono-04", "postgres-types/with-chrono-0_4"]
+with-rust_decimal-1 = ["rust_decimal-1"]
[dependencies]
postgres-protocol = "0.6"
postgres-types = "0.2"
chrono-04 = { version = "0.4", package = "chrono", optional = true, default-features = false }
+rust_decimal-1 = { version = "1.32.0", package = "rust_decimal", optional = true, default-features = false, features = ["db-tokio-postgres"] }
[dev-dependencies]
postgres = "0.19"
diff --git a/src/impls.rs b/src/impls.rs
index 19615e1..c8b2db4 100644
--- a/src/impls.rs
+++ b/src/impls.rs
@@ -1,7 +1,7 @@
-use std::error::Error;
-use postgres_types::{FromSql, IsNull, Kind, ToSql, Type};
-use postgres_types::private::BytesMut;
use postgres_protocol::{self as protocol, types};
+use postgres_types::private::BytesMut;
+use postgres_types::{FromSql, IsNull, Kind, ToSql, Type};
+use std::error::Error;
use crate::{BoundSided, BoundType, Normalizable, Range, RangeBound};
@@ -33,7 +33,10 @@ where
}
}
-fn bound_from_sql<'a, T, S>(bound: types::RangeBound