diff --git a/Cargo.toml b/Cargo.toml index b78c6514..b744f1fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,6 @@ crossbeam-utils = { version = "0.6.6", default-features = false } futures-channel-preview = "0.3.0-alpha.18" futures-core-preview = "0.3.0-alpha.18" futures-util-preview = "0.3.0-alpha.18" -hex = { version = "0.3.2", default-features = false } log = "0.4.8" md-5 = "0.8.0" memchr = "2.2.1" diff --git a/src/lib.rs b/src/lib.rs index 2a959f5a..809185c3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,8 +43,13 @@ pub use self::{ #[cfg(feature = "mariadb")] pub mod mariadb; +#[cfg(feature = "mariadb")] +#[doc(inline)] +pub use mariadb::MariaDb; + #[cfg(feature = "postgres")] pub mod postgres; #[cfg(feature = "postgres")] +#[doc(inline)] pub use self::postgres::Postgres; diff --git a/src/postgres/protocol/password_message.rs b/src/postgres/protocol/password_message.rs index 254dfc1d..8ace172b 100644 --- a/src/postgres/protocol/password_message.rs +++ b/src/postgres/protocol/password_message.rs @@ -34,12 +34,12 @@ impl Encode for PasswordMessage<'_> { hasher.input(password); hasher.input(user); - let credentials = hex::encode(hasher.result_reset()); + let credentials = format!("{:x}", hasher.result_reset()); hasher.input(credentials); hasher.input(salt); - let salted = hex::encode(hasher.result()); + let salted = format!("{:x}", hasher.result()); // len + "md5" + (salted) buf.put_u32::((4 + 3 + salted.len() + 1) as u32);