diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index c4924884..a536cbd6 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Steven Fackler "] [dependencies] -phf_codegen = "0.7.22" -regex = "0.1" +phf_codegen = "0.8" +regex = "1.3.1" marksman_escape = "0.1" -linked-hash-map = "0.4" +linked-hash-map = "0.5" diff --git a/codegen/src/sqlstate.rs b/codegen/src/sqlstate.rs index 3d7a6143..79a69638 100644 --- a/codegen/src/sqlstate.rs +++ b/codegen/src/sqlstate.rs @@ -82,17 +82,15 @@ fn make_consts(codes: &LinkedHashMap>, file: &mut BufWriter< } fn make_map(codes: &LinkedHashMap>, file: &mut BufWriter) { - write!( - file, - " -#[rustfmt::skip] -static SQLSTATE_MAP: phf::Map<&'static str, SqlState> = " - ) - .unwrap(); let mut builder = phf_codegen::Map::new(); for (code, names) in codes { builder.entry(&**code, &format!("SqlState::{}", &names[0])); } - builder.build(file).unwrap(); - writeln!(file, ";").unwrap(); + write!( + file, + " +#[rustfmt::skip] +static SQLSTATE_MAP: phf::Map<&'static str, SqlState> = \n{};\n", + builder.build() + ).unwrap(); } diff --git a/postgres-protocol/Cargo.toml b/postgres-protocol/Cargo.toml index bb34c0a9..13d13c43 100644 --- a/postgres-protocol/Cargo.toml +++ b/postgres-protocol/Cargo.toml @@ -13,10 +13,10 @@ base64 = "0.10" byteorder = "1.0" bytes = "0.4" fallible-iterator = "0.2" -generic-array = "0.12" +generic-array = "0.13" hmac = "0.7" md5 = "0.6" memchr = "2.0" -rand = "0.6" +rand = "0.7" sha2 = "0.8" stringprep = "0.1" diff --git a/tokio-postgres/Cargo.toml b/tokio-postgres/Cargo.toml index 734f3145..f255cab4 100644 --- a/tokio-postgres/Cargo.toml +++ b/tokio-postgres/Cargo.toml @@ -41,16 +41,16 @@ fallible-iterator = "0.2" futures-preview = { version = "=0.3.0-alpha.19", features = ["async-await"] } log = "0.4" parking_lot = "0.9" -percent-encoding = "1.0" +percent-encoding = "2.0" pin-project = "0.4" -phf = "0.7.23" +phf = "0.8" postgres-protocol = { version = "=0.5.0-alpha.1", path = "../postgres-protocol" } postgres-types = { version = "=0.1.0-alpha.1", path = "../postgres-types" } tokio = { version = "=0.2.0-alpha.6", default-features = false, features = ["io", "codec"] } [dev-dependencies] tokio = "=0.2.0-alpha.6" -env_logger = "0.5" +env_logger = "0.7" criterion = "0.3" bit-vec-06 = { version = "0.6", package = "bit-vec" }