From c8561293a7fd112891117bf735f0464911cb4f9a Mon Sep 17 00:00:00 2001 From: Markus Pettersson Date: Mon, 18 Mar 2024 17:35:16 +0100 Subject: [PATCH] Fix typos and broken doc-links --- .../src/relay_selector/detailer.rs | 12 ++++-------- mullvad-relay-selector/src/relay_selector/helpers.rs | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/mullvad-relay-selector/src/relay_selector/detailer.rs b/mullvad-relay-selector/src/relay_selector/detailer.rs index fcbeb136d1c3..31bf900887c3 100644 --- a/mullvad-relay-selector/src/relay_selector/detailer.rs +++ b/mullvad-relay-selector/src/relay_selector/detailer.rs @@ -29,14 +29,10 @@ use super::{ /// Constructs a [`MullvadWireguardEndpoint`] with details for how to connect to a Wireguard relay. /// -/// If entry is `None`, `to_endpoint` configures a single-hop connection using the exit relay data. -/// Otherwise, it constructs a multihop setup using both entry and exit to set up appropriate peer -/// configurations. -/// /// # Returns -/// - A configured Mullvad endpoint for Wireguard, encapsulating either a single-hop or multi-hop connection setup. -/// - Returns `None` if the desired port is not in a valid port range (see -/// [`WireguradRelayQuery::port`]) or relay addresses cannot be resolved. +/// - A configured endpoint for Wireguard relay, encapsulating either a single-hop or multi-hop connection. +/// - Returns [`Option::None`] if the desired port is not in a valid port range (see +/// [`WireguardRelayQuery::port`]) or relay addresses cannot be resolved. pub fn wireguard_endpoint( query: &WireguardRelayQuery, data: &WireguardEndpointData, @@ -97,7 +93,7 @@ fn wireguard_multihop_endpoint( let exit = PeerConfig { public_key: exit.endpoint_data.unwrap_wireguard_ref().public_key.clone(), endpoint: exit_endpoint, - // The exit peer should be able to route incomming VPN traffic to the rest of + // The exit peer should be able to route incoming VPN traffic to the rest of // the internet. allowed_ips: all_of_the_internet(), // This will be filled in later, not the relay selector's problem diff --git a/mullvad-relay-selector/src/relay_selector/helpers.rs b/mullvad-relay-selector/src/relay_selector/helpers.rs index 8cad32d7852f..ccc89571994d 100644 --- a/mullvad-relay-selector/src/relay_selector/helpers.rs +++ b/mullvad-relay-selector/src/relay_selector/helpers.rs @@ -26,7 +26,7 @@ pub fn random<'a, A: PartialEq>( .choose(&mut thread_rng()) } -/// Picks a relay using [Self::pick_random_relay_fn], using the `weight` member of each relay +/// Picks a relay using [pick_random_relay_fn], using the `weight` member of each relay /// as the weight function. pub fn pick_random_relay(relays: &[Relay]) -> Option<&Relay> { pick_random_relay_fn(relays, |relay| relay.weight)