We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ec8f14 commit fa36e6eCopy full SHA for fa36e6e
src/cargo/ops/registry/publish.rs
@@ -799,7 +799,9 @@ fn resolve_registry_or_index(
799
opts: &PublishOpts<'_>,
800
just_pkgs: &[&Package],
801
) -> CargoResult<Option<RegistryOrIndex>> {
802
- Ok(match opts.reg_or_index.clone() {
+ let opt_index_or_registry = opts.reg_or_index.clone();
803
+
804
+ let res = match opt_index_or_registry {
805
Some(r) => {
806
validate_registry(&just_pkgs, Some(&r))?;
807
Some(r)
@@ -818,7 +820,9 @@ fn resolve_registry_or_index(
818
820
}
819
821
reg
822
- })
823
+ };
824
825
+ Ok(res)
826
827
828
fn validate_registry(pkgs: &[&Package], reg_or_index: Option<&RegistryOrIndex>) -> CargoResult<()> {
0 commit comments