Skip to content

Commit 0408e9f

Browse files
committed
map -> if let Some
1 parent d8f0948 commit 0408e9f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cargo/sources/registry/index.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,9 @@ impl IndexSummary {
858858
}
859859
}
860860
let mut summary = Summary::new(config, pkgid, deps, &features, links)?;
861-
cksum.map(|cksum| summary.set_checksum(cksum));
861+
if let Some(cksum) = cksum {
862+
summary.set_checksum(cksum);
863+
}
862864
Ok(IndexSummary {
863865
summary,
864866
yanked: yanked.unwrap_or(false),

0 commit comments

Comments
 (0)