mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
feat: cosmetic work for the "URL" and "repository" spelling (#3152)
This commit is contained in:
parent
81a0cf4a1e
commit
fa0e7e62c1
1 changed files with 2 additions and 2 deletions
|
|
@ -67,11 +67,11 @@ impl FromStr for Dependency {
|
|||
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
|
||||
let mut parts = s.splitn(2, ':');
|
||||
|
||||
let Some(parent) = parts.next() else { bail!("Package url cannot be empty") };
|
||||
let Some(parent) = parts.next() else { bail!("Package URL cannot be empty") };
|
||||
let child = parts.next().unwrap_or_default();
|
||||
|
||||
let Some((_, repo)) = parent.split_once('/') else {
|
||||
bail!("Package url `{parent}` must be in the format `owner/repo`")
|
||||
bail!("Package URL `{parent}` must be in the format `owner/repository`")
|
||||
};
|
||||
|
||||
let name = if child.is_empty() { repo } else { child };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue