diff --git a/arangodb/Cargo.toml b/arangodb/Cargo.toml index 722c0099..69f55c9c 100644 --- a/arangodb/Cargo.toml +++ b/arangodb/Cargo.toml @@ -17,12 +17,11 @@ all-features = true default = ["rt_tokio_1"] rt_tokio_1 = ["deadpool/rt_tokio_1", "arangors/reqwest_async"] rt_async-std_1 = ["deadpool/rt_async-std_1", "arangors/surf_async"] -serde = ["deadpool/serde", "serde_1"] [dependencies] -deadpool = { path = "../", version = "0.9.0", default-features = false, features = ["managed"] } +deadpool = { path = "../", version = "0.9.0", default-features = false, features = ["managed", "serde"] } arangors = { git = "https://github.com/fMeow/arangors", rev = "2c31587", default-features = false, features = ["rocksdb"] } -serde_1 = { package = "serde", version = "1.0", features = ["derive"], optional = true } +serde = { version = "1.0", features = ["derive"] } url = "2.2" [dev-dependencies] diff --git a/arangodb/src/config.rs b/arangodb/src/config.rs index 916cae5b..e82df923 100644 --- a/arangodb/src/config.rs +++ b/arangodb/src/config.rs @@ -1,8 +1,7 @@ use std::fmt; use deadpool::Runtime; -#[cfg(feature = "serde")] -use serde_1::Deserialize; +use serde::Deserialize; use url::Url; use crate::{CreatePoolError, Pool, PoolConfig}; @@ -23,10 +22,9 @@ use crate::{CreatePoolError, Pool, PoolConfig}; /// ARANGODB__POOL__TIMEOUTS__WAIT__NANOS=0 /// ``` /// ```rust -/// # use serde_1 as serde; +/// # use serde; /// # /// #[derive(serde::Deserialize)] -/// # #[serde(crate = "serde_1")] /// struct Config { /// arango: deadpool_arangodb::Config, /// } @@ -39,9 +37,7 @@ use crate::{CreatePoolError, Pool, PoolConfig}; /// } /// } /// ``` -#[derive(Clone, Debug)] -#[cfg_attr(feature = "serde", derive(serde_1::Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "serde_1"))] +#[derive(Clone, Debug, Deserialize)] pub struct Config { /// ArangoDB URL. /// diff --git a/arangodb/src/lib.rs b/arangodb/src/lib.rs index 3f425c62..43d41399 100644 --- a/arangodb/src/lib.rs +++ b/arangodb/src/lib.rs @@ -22,10 +22,7 @@ mod config; -use std::{ - convert::Infallible, - ops::{Deref, DerefMut}, -}; +use std::ops::{Deref, DerefMut}; use arangors::{uclient::ClientExt, ClientError, Connection as ArangoConnection}; use deadpool::{async_trait, managed}; diff --git a/arangodb/tests/arangodb.rs b/arangodb/tests/arangodb.rs index 026e0dac..a0ee045e 100644 --- a/arangodb/tests/arangodb.rs +++ b/arangodb/tests/arangodb.rs @@ -1,4 +1,4 @@ -use serde_1::Deserialize; +use serde::Deserialize; use deadpool_arangodb::Runtime; @@ -7,7 +7,6 @@ fn default_dbname() -> String { } #[derive(Debug, Default, Deserialize)] -#[serde(crate = "serde_1")] struct Config { #[serde(default)] arango: deadpool_arangodb::Config,