From 707b8bc0c11c31c90012a006ebf4b66a4780a4a6 Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Thu, 28 Nov 2024 23:19:21 +0800 Subject: [PATCH] chore: fixed warning when building with no-default-feature --- crates/shadowsocks/src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/shadowsocks/src/config.rs b/crates/shadowsocks/src/config.rs index c3f4597cfcd9..5cf530896317 100644 --- a/crates/shadowsocks/src/config.rs +++ b/crates/shadowsocks/src/config.rs @@ -464,6 +464,8 @@ fn make_derived_key(method: CipherKind, password: &str, enc_key: &mut [u8]) -> R if #[cfg(any(feature = "stream-cipher", feature = "aead-cipher"))] { let _ = method; openssl_bytes_to_key(password.as_bytes(), enc_key); + + Ok(()) } else { // No default implementation. let _ = password; @@ -471,8 +473,6 @@ fn make_derived_key(method: CipherKind, password: &str, enc_key: &mut [u8]) -> R unreachable!("{method} don't know how to make a derived key"); } } - - Ok(()) } /// Check if method supports Extended Identity Header