Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Upgrade type crate versions #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions postgres-shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,22 @@ description = "Internal crate used by postgres and postgres-tokio"
repository = "https://github.com/sfackler/rust-postgres"

[features]
with-bit-vec = ["bit-vec"]
with-chrono = ["chrono"]
with-eui48 = ["eui48"]
with-geo = ["geo"]
with-rustc-serialize = ["rustc-serialize"]
with-serde_json = ["serde_json"]
with-time = ["time"]
with-uuid = ["uuid"]
"with-bit-vec-0.5" = ["bit-vec"]
"with-chrono-0.4" = ["chrono"]
"with-eui48-0.3" = ["eui48"]
"with-geo-0.8" = ["geo"]
with-serde_json-1 = ["serde_json"]
"with-uuid-0.6" = ["uuid"]

[dependencies]
hex = "0.3"
fallible-iterator = "0.1.3"
phf = "=0.7.21"
postgres-protocol = { version = "0.3", path = "../postgres-protocol" }

bit-vec = { version = "0.4", optional = true }
bit-vec = { version = "0.5", optional = true }
chrono = { version = "0.4", optional = true }
eui48 = { version = "0.3", optional = true }
geo = { version = "0.4", optional = true }
rustc-serialize = { version = "0.3", optional = true }
geo = { version = "0.8", optional = true }
serde_json = { version = "1.0", optional = true }
time = { version = "0.1.14", optional = true }
uuid = { version = "0.5", optional = true }
uuid = { version = "0.6", optional = true }
16 changes: 6 additions & 10 deletions postgres-shared/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,17 @@ where
v.to_sql(ty, out)
}

#[cfg(feature = "with-bit-vec")]
#[cfg(feature = "with-bit-vec-0.5")]
mod bit_vec;
#[cfg(feature = "with-chrono")]
#[cfg(feature = "with-chrono-0.4")]
mod chrono;
#[cfg(feature = "with-eui48")]
#[cfg(feature = "with-eui48-0.3")]
mod eui48;
#[cfg(feature = "with-geo")]
#[cfg(feature = "with-geo-0.8")]
mod geo;
#[cfg(feature = "with-rustc-serialize")]
mod rustc_serialize;
#[cfg(feature = "with-serde_json")]
#[cfg(feature = "with-serde_json-1")]
mod serde_json;
#[cfg(feature = "with-time")]
mod time;
#[cfg(feature = "with-uuid")]
#[cfg(feature = "with-uuid-0.6")]
mod uuid;

mod special;
Expand Down
36 changes: 0 additions & 36 deletions postgres-shared/src/types/rustc_serialize.rs

This file was deleted.

41 changes: 0 additions & 41 deletions postgres-shared/src/types/time.rs

This file was deleted.

37 changes: 15 additions & 22 deletions postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ categories = ["database"]

[package.metadata.docs.rs]
features = [
"with-bit-vec",
"with-chrono",
"with-eui48",
"with-geo",
"with-rustc-serialize",
"with-serde_json",
"with-time",
"with-uuid",
"with-bit-vec-0.5",
"with-chrono-0.4",
"with-eui48-0.3",
"with-geo-0.8",
"with-serde_json-1",
"with-uuid-0.6",
"with-openssl",
"with-native-tls",
]
Expand All @@ -38,14 +36,12 @@ name = "test"
path = "tests/test.rs"

[features]
with-bit-vec = ["postgres-shared/with-bit-vec"]
with-chrono = ["postgres-shared/with-chrono"]
with-eui48 = ["postgres-shared/with-eui48"]
with-geo = ["postgres-shared/with-geo"]
with-rustc-serialize = ["postgres-shared/with-rustc-serialize"]
with-serde_json = ["postgres-shared/with-serde_json"]
with-time = ["postgres-shared/with-time"]
with-uuid = ["postgres-shared/with-uuid"]
"with-bit-vec-0.5" = ["postgres-shared/with-bit-vec-0.5"]
"with-chrono-0.4" = ["postgres-shared/with-chrono-0.4"]
"with-eui48-0.3" = ["postgres-shared/with-eui48-0.3"]
"with-geo-0.8" = ["postgres-shared/with-geo-0.8"]
"with-serde_json-1" = ["postgres-shared/with-serde_json-1"]
"with-uuid-0.6" = ["postgres-shared/with-uuid-0.6"]

with-openssl = ["openssl"]
with-native-tls = ["native-tls"]
Expand All @@ -62,7 +58,6 @@ socket2 = { version = "0.3.5", features = ["unix"] }

openssl = { version = "0.9.23", optional = true }
native-tls = { version = "0.1", optional = true }
rustc-serialize = { version = "0.3", optional = true }
schannel = { version = "0.1", optional = true }
security-framework = { version = "0.1.2", optional = true }

Expand All @@ -73,11 +68,9 @@ postgres-shared = { version = "0.4.1", path = "../postgres-shared" }
hex = "0.3"
url = "1.0"

bit-vec = "0.4"
bit-vec = "0.5"
chrono = "0.4"
eui48 = "0.3"
geo = "0.4"
rustc-serialize = "0.3"
geo = "0.8"
serde_json = "1.0"
time = "0.1.14"
uuid = "0.5"
uuid = "0.6"
16 changes: 6 additions & 10 deletions postgres/tests/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@ use std::result;
use postgres::types::{FromSql, FromSqlOwned, IsNull, Kind, ToSql, Type, WrongType};
use postgres::{Connection, TlsMode};

#[cfg(feature = "with-bit-vec")]
#[cfg(feature = "with-bit-vec-0.5")]
mod bit_vec;
#[cfg(feature = "with-chrono")]
#[cfg(feature = "with-chrono-0.4")]
mod chrono;
#[cfg(feature = "with-eui48")]
#[cfg(feature = "with-eui48-0.3")]
mod eui48;
#[cfg(feature = "with-geo")]
#[cfg(feature = "with-geo-0.8")]
mod geo;
#[cfg(feature = "with-rustc-serialize")]
mod rustc_serialize;
#[cfg(feature = "with-serde_json")]
#[cfg(feature = "with-serde_json-1")]
mod serde_json;
#[cfg(feature = "with-time")]
mod time;
#[cfg(feature = "with-uuid")]
#[cfg(feature = "with-uuid-0.6")]
mod uuid;

fn test_type<T, S>(sql_type: &str, checks: &[(T, S)])
Expand Down
41 changes: 0 additions & 41 deletions postgres/tests/types/rustc_serialize.rs

This file was deleted.

72 changes: 0 additions & 72 deletions postgres/tests/types/time.rs

This file was deleted.

28 changes: 12 additions & 16 deletions tokio-postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,25 @@ categories = ["database"]

[package.metadata.docs.rs]
features = [
"with-bit-vec",
"with-chrono",
"with-eui48",
"with-geo",
"with-rustc-serialize",
"with-serde_json",
"with-time",
"with-uuid",
"with-bit-vec-0.5",
"with-chrono-0.4",
"with-eui48-0.3",
"with-geo-0.8",
"with-serde_json-1",
"with-uuid-0.6",
"with-openssl",
]

[badges]
circle-ci = { repository = "sfackler/rust-postgres" }

[features]
with-bit-vec = ["postgres-shared/with-bit-vec"]
with-chrono = ["postgres-shared/with-chrono"]
with-eui48 = ["postgres-shared/with-eui48"]
with-geo = ["postgres-shared/with-geo"]
with-rustc-serialize = ["postgres-shared/with-rustc-serialize"]
with-serde_json = ["postgres-shared/with-serde_json"]
with-time = ["postgres-shared/with-time"]
with-uuid = ["postgres-shared/with-uuid"]
"with-bit-vec-0.5" = ["postgres-shared/with-bit-vec-0.5"]
"with-chrono-0.4" = ["postgres-shared/with-chrono-0.4"]
"with-eui48-0.3" = ["postgres-shared/with-eui48-0.3"]
"with-geo-0.8" = ["postgres-shared/with-geo-0.8"]
"with-serde_json-1" = ["postgres-shared/with-serde_json-1"]
"with-uuid-0.6" = ["postgres-shared/with-uuid-0.6"]

with-openssl = ["tokio-openssl", "openssl"]

Expand Down