From be858579fdec474a2970d27cc3d4a70ea7f75d57 Mon Sep 17 00:00:00 2001 From: EAimTY Date: Sun, 4 Jun 2023 14:58:31 +0900 Subject: [PATCH] deserialize socks5 auth config as plain strings --- tuic-client/src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tuic-client/src/config.rs b/tuic-client/src/config.rs index c44ce5f..65cb2b4 100644 --- a/tuic-client/src/config.rs +++ b/tuic-client/src/config.rs @@ -277,8 +277,8 @@ pub fn deserialize_optional_bytes<'de, D>(deserializer: D) -> Result, { - let s = Option::::deserialize(deserializer)?; - Ok(s.map(|s| s.into_bytes())) + let s = String::deserialize(deserializer)?; + Ok(Some(s.into_bytes())) } pub fn deserialize_duration<'de, D>(deserializer: D) -> Result