Skip to content

Commit 3360143

Browse files
authored
Remove feature-guarded dependencies on 'postgres' and 'tokio_postgres' (paupino#651)
...and replace with dependency on 'postgres_types'
1 parent c5d4afe commit 3360143

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ diesel1 = { default-features = false, optional = true, package = "diesel", versi
2727
diesel2 = { default-features = false, optional = true, package = "diesel", version = "2.1" }
2828
ndarray = { default-features = false, optional = true, version = "0.15.6" }
2929
num-traits = { default-features = false, features = ["i128"], version = "0.2" }
30-
postgres = { default-features = false, optional = true, version = "0.19" }
30+
postgres-types = { default-features = false, optional = true, version = "0.2" }
3131
proptest = { default-features = false, optional = true, features = ["std"], version = "1.0" }
3232
rand = { default-features = false, optional = true, version = "0.8" }
3333
rkyv = { default-features = false, features = ["size_32", "std"], optional = true, version = "0.7.42" }
@@ -49,6 +49,8 @@ serde = { default-features = false, features = ["derive"], version = "1.0" }
4949
serde_json = "1.0"
5050
tokio = { default-features = false, features = ["macros", "rt-multi-thread", "test-util"], version = "1.0" }
5151
version-sync = { default-features = false, features = ["html_root_url_updated", "markdown_deps_updated"], version = "0.9" }
52+
postgres = { default-features = false, version = "0.19" }
53+
tokio-postgres = { default-features = false, version = "0.7" }
5254

5355
[features]
5456
default = ["serde", "std"]
@@ -63,8 +65,8 @@ db-diesel1-mysql = ["diesel1/mysql", "std"]
6365
db-diesel1-postgres = ["diesel1/postgres", "std"]
6466
db-diesel2-mysql = ["diesel2/mysql", "std"]
6567
db-diesel2-postgres = ["diesel2/postgres", "std"]
66-
db-postgres = ["dep:bytes", "dep:postgres", "std"]
67-
db-tokio-postgres = ["dep:bytes", "dep:postgres", "std", "dep:tokio-postgres"]
68+
db-postgres = ["dep:bytes", "dep:postgres-types", "std"]
69+
db-tokio-postgres = ["dep:bytes", "dep:postgres-types", "std"]
6870
legacy-ops = []
6971
maths = []
7072
maths-nopanic = ["maths"]

src/postgres/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::postgres::common::*;
22
use crate::Decimal;
33
use bytes::{BufMut, BytesMut};
4-
use postgres::types::{to_sql_checked, FromSql, IsNull, ToSql, Type};
4+
use postgres_types::{to_sql_checked, FromSql, IsNull, ToSql, Type};
55
use std::io::{Cursor, Read};
66

77
fn read_two_bytes(cursor: &mut Cursor<&[u8]>) -> std::io::Result<[u8; 2]> {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy