diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-23 14:02:09 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-23 14:02:09 +0100 |
| commit | 055316ba3e50ffc3efb9be5f60afda669d74e548 (patch) | |
| tree | 20e34c6831dcf12866aa3a6d092d3e107ebec735 /src/bin/ngit | |
| parent | dd5300b301292c3944aad4dcdecf4802307c7ea2 (diff) | |
refactor: Rename fallback relays and grasp servers
Rename `params.fallback_relays` and `client.fallback_relays` to
`relay_default_set`. Rename `params.fallback_grasp_servers` to
`grasp_default_set`. This includes updating associated getters and
usages across the codebase.
Diffstat (limited to 'src/bin/ngit')
| -rw-r--r-- | src/bin/ngit/sub_commands/init.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs index 52e43e9..eaaf83d 100644 --- a/src/bin/ngit/sub_commands/init.rs +++ b/src/bin/ngit/sub_commands/init.rs | |||
| @@ -229,7 +229,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 229 | .map(std::string::ToString::to_string) | 229 | .map(std::string::ToString::to_string) |
| 230 | .collect::<Vec<String>>() | 230 | .collect::<Vec<String>>() |
| 231 | } else { | 231 | } else { |
| 232 | client.get_fallback_relays().clone() | 232 | client.get_relay_default_set().clone() |
| 233 | } | 233 | } |
| 234 | } else { | 234 | } else { |
| 235 | args.relays.clone() | 235 | args.relays.clone() |
| @@ -252,7 +252,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 252 | args.blossoms.clone() | 252 | args.blossoms.clone() |
| 253 | }; | 253 | }; |
| 254 | 254 | ||
| 255 | let fallback_grasp_servers = client.get_fallback_grasp_servers(); | 255 | let fallback_grasp_servers = client.get_grasp_default_set(); |
| 256 | 256 | ||
| 257 | let selected_grasp_servers = if has_server_and_relay_flags { | 257 | let selected_grasp_servers = if has_server_and_relay_flags { |
| 258 | // ignore so a script running `ngit init` can contiue without prompts | 258 | // ignore so a script running `ngit init` can contiue without prompts |
| @@ -456,7 +456,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 456 | let mut selections: Vec<bool> = vec![true; options.len()]; | 456 | let mut selections: Vec<bool> = vec![true; options.len()]; |
| 457 | 457 | ||
| 458 | // add fallback relays as options | 458 | // add fallback relays as options |
| 459 | for relay in client.get_fallback_relays().clone() { | 459 | for relay in client.get_relay_default_set().clone() { |
| 460 | if !options.iter().any(|r| r.contains(&relay)) | 460 | if !options.iter().any(|r| r.contains(&relay)) |
| 461 | && !formatted_selected_grasp_servers | 461 | && !formatted_selected_grasp_servers |
| 462 | .iter() | 462 | .iter() |