Skip to content

Commit

Permalink
Fix typos and broken doc-links
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Mar 18, 2024
1 parent 6a061a0 commit c856129
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions mullvad-relay-selector/src/relay_selector/detailer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mullvad-relay-selector/src/relay_selector/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c856129

Please sign in to comment.