5122: Fix "Run | Debug" lens for examples r=matklad a=vsrs

Fixes #4974

Co-authored-by: vsrs <vit@conrlab.com>
This commit is contained in:
bors[bot] 2020-06-29 15:55:42 +00:00 committed by GitHub
commit 86f1556f7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1283,7 +1283,7 @@ fn should_skip_target(runnable: &Runnable, cargo_spec: Option<&CargoTargetSpec>)
RunnableKind::Bin => {
// Do not suggest binary run on other target than binary
match &cargo_spec {
Some(spec) => spec.target_kind != TargetKind::Bin,
Some(spec) => !matches!(spec.target_kind, TargetKind::Bin | TargetKind::Example),
None => true,
}
}