Skip to content

Commit

Permalink
map -> if let Some
Browse files Browse the repository at this point in the history
  • Loading branch information
jarhodes314 authored Oct 7, 2022
1 parent 965129a commit ae6e5d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cargo/sources/registry/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit ae6e5d0

Please sign in to comment.