Skip to content

Commit

Permalink
Implement PR feedback part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
buggmagnet committed May 10, 2024
1 parent 706162d commit bb4d523
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion talpid-routing/src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
9 changes: 3 additions & 6 deletions talpid-tunnel-config-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Channel>,
#[cfg(target_os = "ios")] mut client: RelayConfigService,
) -> Result<EphemeralPeer, Error> {
let (pq_request, kem_secrets) = post_quantum_secrets(enable_post_quantum).await;

Expand Down Expand Up @@ -200,7 +198,7 @@ async fn post_quantum_secrets(
Option<PostQuantumRequestV1>,
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());

Expand All @@ -221,8 +219,7 @@ async fn post_quantum_secrets(
)
} else {
(None, None)
};
(pq_request, kem_secrets)
}
}

/// Performs `dst = dst ^ src`.
Expand Down

0 comments on commit bb4d523

Please sign in to comment.