5XMUEZMZXQ4T4HGZAGBZWT5YKEXOA7IWLZBSREWBHXLMGHXOFXZAC
MU5GSJAW65PEG3BRYUKZ7O37BPHW3MOX3S5E2RFOXKGUOJEEDQ5AC
L4JXJHWXYNCL4QGJXNKKTOKKTAXKKXBJUUY7HFZGEUZ5A2V5H34QC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
5QTMRUXNE2XNJCMLN6MQN24UEZ55EFC3LIR4PO6OPNTT5KEL7WXQC
76PCXGML77EZWTRI5E6KHLVRAFTJ2AB5YRN5EKOYNAPKTWY2KCGAC
use anyhow::bail;
use anyhow::{bail, Context};
pub fn repo_name(&self) -> Option<String> {
pub fn repo_name(&self) -> Result<Option<String>, anyhow::Error> {
Some(s.name.split_at(sep + 1).1.to_string())
Ok(Some(s.name.split_at(sep + 1).1.to_string()))
Some(s.name.as_str().to_string())
Ok(Some(s.name.as_str().to_string()))
Some(file.to_str().unwrap().to_string())
Ok(Some( file.to_str() .context("failed to decode local repository name")? .to_string(), ))
Ok(Some(
file.to_str()
.context("failed to decode local repository name")?
.to_string(),
))
None
Ok(None)
let url = reqwest::Url::parse(&h.url).unwrap();
let url = reqwest::Url::parse(&h.url).context("failed to parse remote repository URL")?;
let url =
reqwest::Url::parse(&h.url).context("failed to parse remote repository URL")?;
Some(name.to_string())
Ok(Some(name.to_string()))
url.host().map(|h| h.to_string())
Ok(url.host().map(|h| h.to_string()))
RemoteRepo::LocalChannel(_) => None,
RemoteRepo::LocalChannel(_) => Ok(None),
} else if let Some(path) = remote.repo_name() {
} else if let Some(path) = remote.repo_name()? {