*: Replace _serde with dep:serde in Cargo.toml (#2868)

This commit is contained in:
Alexander Shishenko
2022-09-08 11:30:43 +03:00
committed by GitHub
parent 83c67954e9
commit c650dc19db
7 changed files with 5 additions and 14 deletions

View File

@ -29,7 +29,7 @@ unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] }
void = "1.0"
futures-timer = "3.0.2"
instant = "0.1.11"
_serde = { package = "serde", version = "1.0", optional = true, features = ["derive"] }
serde = { version = "1.0", optional = true, features = ["derive"] }
thiserror = "1"
[dev-dependencies]
@ -43,4 +43,4 @@ quickcheck = "0.9.0"
prost-build = "0.11"
[features]
serde = ["_serde", "bytes/serde"]
serde = ["dep:serde", "bytes/serde"]

View File

@ -39,9 +39,6 @@
// be useful later for record store
#![allow(dead_code)]
#[cfg(feature = "serde")]
extern crate _serde as serde;
pub mod handler;
pub mod kbucket;
pub mod protocol;

View File

@ -32,7 +32,6 @@ use std::hash::{Hash, Hasher};
/// The (opaque) key of a record.
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", serde(crate = "_serde"))]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Key(Bytes);