1
0

deserialize socks5 auth config as plain strings

This commit is contained in:
EAimTY 2023-06-04 14:58:31 +09:00
parent 29b75ac739
commit be858579fd

View File

@ -277,8 +277,8 @@ pub fn deserialize_optional_bytes<'de, D>(deserializer: D) -> Result<Option<Vec<
where
D: Deserializer<'de>,
{
let s = Option::<String>::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<Duration, D::Error>