From ae6e5d0f2a52e2c70ea3abe19313ba1637342c7b Mon Sep 17 00:00:00 2001 From: James Rhodes <30299230+jarhodes314@users.noreply.github.com> Date: Fri, 7 Oct 2022 21:57:49 +0200 Subject: [PATCH] map -> if let Some --- src/cargo/sources/registry/index.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cargo/sources/registry/index.rs b/src/cargo/sources/registry/index.rs index 4cacc1f68c6c..1d45de8a278f 100644 --- a/src/cargo/sources/registry/index.rs +++ b/src/cargo/sources/registry/index.rs @@ -858,7 +858,9 @@ impl IndexSummary { } } let mut summary = Summary::new(config, pkgid, deps, &features, links)?; - cksum.map(|cksum| summary.set_checksum(cksum)); + if let Some(cksum) = cksum { + summary.set_checksum(cksum); + } Ok(IndexSummary { summary, yanked: yanked.unwrap_or(false),