Skip to content

Commit

Permalink
feat: support for example targets (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
mettz committed Jan 17, 2022
1 parent 5585675 commit 07c877f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ pub fn fncmd(attr: TokenStream, item: TokenStream) -> TokenStream {
let bin_targets = package
.targets
.iter()
.filter_map(|target| target.kind.contains(&"bin".into()).then(|| target))
.filter_map(|target| {
target
.kind
.iter()
.any(|k| k == "bin" || k == "example")
.then(|| target)
})
.collect::<Vec<_>>();
let self_version = package.version.to_string();

Expand Down

0 comments on commit 07c877f

Please sign in to comment.