We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c733a58 commit aceaa51Copy full SHA for aceaa51
1 file changed
src/rust_project.rs
@@ -494,11 +494,11 @@ impl PackageGraph {
494
.targets
495
.iter()
496
.enumerate()
497
- .filter_map(|(i, target)| {
498
- matches!(TargetKind::new(&target.kind), TargetKind::Lib)
499
- // I *think* this is the right way to handle target names in this
500
- // context...
501
- .then(|| (crates.len() + i, target.name.clone().replace('-', "_")))
+ .filter(|(_, target)| matches!(TargetKind::new(&target.kind), TargetKind::Lib))
+ .map(|(i, target)| {
+ // I *think* this is the right way to handle target names in this
+ // context...
+ (crates.len() + i, target.name.clone().replace('-', "_"))
502
})
503
.collect();
504
0 commit comments