Skip to content

Commit 1b63778

Browse files
committed
refactor: pull out opt_index_or_registry in resolve_registry_or_index()
1 parent 5b41cea commit 1b63778

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cargo/ops/registry/publish.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,9 @@ fn resolve_registry_or_index(
799799
opts: &PublishOpts<'_>,
800800
just_pkgs: &[&Package],
801801
) -> CargoResult<Option<RegistryOrIndex>> {
802-
Ok(match opts.reg_or_index.clone() {
802+
let opt_index_or_registry = opts.reg_or_index.clone();
803+
804+
Ok(match opt_index_or_registry {
803805
Some(r) => {
804806
validate_registry(&just_pkgs, Some(&r))?;
805807
Some(r)

0 commit comments

Comments
 (0)