From 309c8760dbe3813d8d32c7f093bb0df2c46f6ec0 Mon Sep 17 00:00:00 2001 From: Conrad Kleinespel Date: Tue, 12 Jul 2022 22:25:33 +0200 Subject: [PATCH] Fix use of serde after removing it from rpassword --- Cargo.toml | 6 +++--- src/rutil.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 89f1ddf..1b53aa1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,9 +12,7 @@ keywords = ["read", "password", "security", "pass", "getpass"] edition = "2018" [features] -# Do not use this. Exists only to workaround the `duck` monorepo's structure. -# It is not covered by any semver versioning. -__serde = [] +serde = ["dep:serde", "dep:serde_json"] [target.'cfg(unix)'.dependencies] libc = "0.2" @@ -23,3 +21,5 @@ libc = "0.2" winapi = { version = "0.3", features = ["std", "winnt", "fileapi", "processenv", "winbase", "handleapi", "consoleapi", "minwindef", "wincon"] } [dependencies] +serde = { version = "1.0", features = ["derive"], optional = true } +serde_json = { version = "1.0", optional = true } diff --git a/src/rutil.rs b/src/rutil.rs index 8f59a2f..6843278 100644 --- a/src/rutil.rs +++ b/src/rutil.rs @@ -2,6 +2,6 @@ pub mod atty; pub mod fix_new_line; pub mod print_tty; pub mod safe_string; -#[cfg(feature = "__serde")] +#[cfg(feature = "serde")] pub mod safe_string_serde; pub mod safe_vec;