summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mullvad-relay-selector/src/relay_selector/mod.rs24
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(