Skip to content

Commit

Permalink
Fix nit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jontified committed Dec 24, 2023
1 parent 85572c1 commit ab8c900
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions talpid-core/src/tunnel_state_machine/connected_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ impl ConnectedState {

fn get_firewall_policy(&self, shared_values: &SharedTunnelStateValues) -> FirewallPolicy {
let endpoint = self.tunnel_parameters.get_next_hop_endpoint();

#[cfg(target_os = "windows")]
let clients = AllowedClients::from(TunnelMonitor::get_relay_client(&shared_values.resource_dir, params).into_iter().collect());

#[cfg(not(target_os = "windows"))]
let clients = if self
.tunnel_parameters
.get_openvpn_local_proxy_settings()
Expand Down
2 changes: 1 addition & 1 deletion talpid-core/src/tunnel_state_machine/connecting_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl ConnectingState {
let endpoint = params.get_next_hop_endpoint();

#[cfg(target_os = "windows")]
let clients = AllowedClients::from(TunnelMonitor::get_relay_client(&shared_values.resource_dir, params));
let clients = AllowedClients::from(TunnelMonitor::get_relay_client(&shared_values.resource_dir, params).into_iter().collect());

#[cfg(not(target_os = "windows"))]
let clients = if params.get_openvpn_local_proxy_settings().is_some() {
Expand Down
6 changes: 3 additions & 3 deletions talpid-types/src/net/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ impl std::ops::Deref for AllowedClients {
}

#[cfg(windows)]
impl From<Option<PathBuf>> for AllowedClients {
fn from(value: Option<PathBuf>) -> Self {
Self(value.iter().collect::<Vec<_>>().into())
impl From<Vec<PathBuf>> for AllowedClients {
fn from(value: Vec<PathBuf>) -> Self {
Self(value.into())
}
}

Expand Down

0 comments on commit ab8c900

Please sign in to comment.