Skip to content

Commit b4eba12

Browse files
committed
Remove a bogus expect
It's possible to hit this when using `rustup update --force`
1 parent be16639 commit b4eba12

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rustup-dist/src/manifestation.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,10 @@ impl Update {
649649
let package = new_manifest.get_package(&component.short_name_in_manifest())?;
650650
let target_package = package.get_target(component.target.as_ref())?;
651651

652-
let bins = target_package.bins.as_ref().expect("components available");
652+
let bins = match target_package.bins {
653+
None => continue,
654+
Some(ref bins) => bins,
655+
};
653656
let c_u_h = if let (Some(url), Some(hash)) = (bins.xz_url.clone(), bins.xz_hash.clone())
654657
{
655658
(component.clone(), Format::Xz, url, hash)

0 commit comments

Comments
 (0)