upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/list.rs4
-rw-r--r--src/lib/repo_ref.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/list.rs b/src/lib/list.rs
index b940546..b867858 100644
--- a/src/lib/list.rs
+++ b/src/lib/list.rs
@@ -9,7 +9,7 @@ use crate::{
9 Repo, RepoActions, 9 Repo, RepoActions,
10 nostr_url::{CloneUrl, NostrUrlDecoded, ServerProtocol}, 10 nostr_url::{CloneUrl, NostrUrlDecoded, ServerProtocol},
11 }, 11 },
12 repo_ref::is_grasp_server, 12 repo_ref::is_grasp_server_in_list,
13 utils::{Direction, get_read_protocols_to_try, join_with_and, set_protocol_preference}, 13 utils::{Direction, get_read_protocols_to_try, join_with_and, set_protocol_preference},
14}; 14};
15 15
@@ -23,7 +23,7 @@ pub fn list_from_remotes(
23 let mut remote_states = HashMap::new(); 23 let mut remote_states = HashMap::new();
24 let mut errors = HashMap::new(); 24 let mut errors = HashMap::new();
25 for url in git_servers { 25 for url in git_servers {
26 let is_grasp_server = is_grasp_server(url, grasp_servers); 26 let is_grasp_server = is_grasp_server_in_list(url, grasp_servers);
27 match list_from_remote(term, git_repo, url, decoded_nostr_url, is_grasp_server) { 27 match list_from_remote(term, git_repo, url, decoded_nostr_url, is_grasp_server) {
28 Err(error) => { 28 Err(error) => {
29 errors.insert(url, error); 29 errors.insert(url, error);
diff --git a/src/lib/repo_ref.rs b/src/lib/repo_ref.rs
index e3f71a1..5e857e9 100644
--- a/src/lib/repo_ref.rs
+++ b/src/lib/repo_ref.rs
@@ -740,7 +740,7 @@ pub fn extract_npub(s: &str) -> Result<&str> {
740} 740}
741 741
742// this should be called is_grasp_server_in_list 742// this should be called is_grasp_server_in_list
743pub fn is_grasp_server(url: &str, grasp_servers: &[String]) -> bool { 743pub fn is_grasp_server_in_list(url: &str, grasp_servers: &[String]) -> bool {
744 if !grasp_servers.is_empty() { 744 if !grasp_servers.is_empty() {
745 if let Ok(url) = normalize_grasp_server_url(url) { 745 if let Ok(url) = normalize_grasp_server_url(url) {
746 grasp_servers.iter().any(|s| { 746 grasp_servers.iter().any(|s| {