From bb4d523bc5608ea7f8f23b7cf87afbd9593014d9 Mon Sep 17 00:00:00 2001 From: Bug Magnet Date: Fri, 10 May 2024 12:13:12 +0200 Subject: [PATCH] Implement PR feedback part 2 --- talpid-routing/src/unix/mod.rs | 2 +- talpid-tunnel-config-client/src/lib.rs | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/talpid-routing/src/unix/mod.rs b/talpid-routing/src/unix/mod.rs index ca3f44093540..f661c5168eff 100644 --- a/talpid-routing/src/unix/mod.rs +++ b/talpid-routing/src/unix/mod.rs @@ -18,7 +18,7 @@ use futures::stream::Stream; use std::net::IpAddr; #[allow(clippy::module_inception)] -#[cfg(any(target_os = "macos", target_os = "ios"))] +#[cfg(any(target_os = "macos"))] #[path = "macos/mod.rs"] pub mod imp; diff --git a/talpid-tunnel-config-client/src/lib.rs b/talpid-tunnel-config-client/src/lib.rs index 04a81d924bd2..8c9db1d78cef 100644 --- a/talpid-tunnel-config-client/src/lib.rs +++ b/talpid-tunnel-config-client/src/lib.rs @@ -24,8 +24,6 @@ mod proto { #[cfg(target_os = "ios")] pub mod ios_ffi; -#[cfg(target_os = "ios")] -use proto::ephemeral_peer_client::EphemeralPeerClient; #[cfg(not(target_os = "ios"))] use libc::setsockopt; @@ -126,7 +124,7 @@ pub async fn request_ephemeral_peer( ephemeral_pubkey: PublicKey, enable_post_quantum: bool, enable_daita: bool, - #[cfg(target_os = "ios")] mut client: EphemeralPeerClient, + #[cfg(target_os = "ios")] mut client: RelayConfigService, ) -> Result { let (pq_request, kem_secrets) = post_quantum_secrets(enable_post_quantum).await; @@ -200,7 +198,7 @@ async fn post_quantum_secrets( Option, Option<(classic_mceliece_rust::SecretKey<'static>, [u8; 3168])>, ) { - let (pq_request, kem_secrets) = if enable_post_quantum { + if enable_post_quantum { let (cme_kem_pubkey, cme_kem_secret) = classic_mceliece::generate_keys().await; let kyber_keypair = kyber::keypair(&mut rand::thread_rng()); @@ -221,8 +219,7 @@ async fn post_quantum_secrets( ) } else { (None, None) - }; - (pq_request, kem_secrets) + } } /// Performs `dst = dst ^ src`.