diff options
| author | Sebastian Holmin <sebastian.holmin@mullvad.net> | 2024-04-17 14:21:16 +0200 |
|---|---|---|
| committer | Sebastian Holmin <sebastian.holmin@mullvad.net> | 2024-04-17 16:04:25 +0200 |
| commit | 247b25ea3268ebce72209b4fdecab391fe91b4d1 (patch) | |
| tree | d620ec1fa4af83e81dfd3932a7b42234bbec57fe | |
| parent | f1d97bc5fd2107f3f90d9aea8f9e55a12f6c13bb (diff) | |
| download | mullvadvpn-247b25ea3268ebce72209b4fdecab391fe91b4d1.tar.xz mullvadvpn-247b25ea3268ebce72209b4fdecab391fe91b4d1.zip | |
Remove unused fn `would_return`
| -rw-r--r-- | mullvad-relay-selector/src/relay_selector/mod.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/mullvad-relay-selector/src/relay_selector/mod.rs b/mullvad-relay-selector/src/relay_selector/mod.rs index 3f92bd344b..758e580b0e 100644 --- a/mullvad-relay-selector/src/relay_selector/mod.rs +++ b/mullvad-relay-selector/src/relay_selector/mod.rs @@ -527,30 +527,6 @@ impl RelaySelector { self.get_relay_with_custom_params(retry_attempt, &RETRY_ORDER, runtime_params) } - /// Peek at which [`TunnelType`] that would be returned for a certain connection attempt for a - /// given [`SelectorConfig`]. Returns [`Option::None`] if the given config would return a - /// custom tunnel endpoint. - /// - /// # Note - /// This function is only really useful for testing-purposes. It is exposed to ease testing of - /// other mullvad crates which depend on the retry behaviour of [`RelaySelector`]. - pub fn would_return(connection_attempt: usize, config: &SelectorConfig) -> Option<TunnelType> { - match SpecializedSelectorConfig::from(config) { - // This case is not really interesting - SpecializedSelectorConfig::Custom(_) => None, - SpecializedSelectorConfig::Normal(config) => Some( - Self::pick_and_merge_query( - connection_attempt, - &RETRY_ORDER, - RuntimeParameters::default(), - RelayQuery::from(config), - ) - .tunnel_protocol - .unwrap_or(TunnelType::Wireguard), - ), - } - } - /// Returns a random relay and relay endpoint matching the current constraints defined by /// `retry_order` corresponding to `retry_attempt`. pub fn get_relay_with_custom_params( |
