Skip to content

Commit

Permalink
Use .parse()
Browse files Browse the repository at this point in the history
  • Loading branch information
dgehriger committed Dec 18, 2024
1 parent 463e231 commit 0f35c69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ impl Config {
/// - None -> alias://<default>
pub fn parse_registry_arg(&self, registry: &Option<String>) -> miette::Result<RegistryRef> {
match registry {
Some(registry) => RegistryRef::from_str(registry),
Some(registry) => registry.parse(),
None => match &self.default_registry {
Some(default_registry) => RegistryRef::from_str(default_registry),
Some(default_registry) => default_registry.parse(),
None => bail!("no registry provided and no default registry found"),
},
}
Expand Down

0 comments on commit 0f35c69

Please sign in to comment.