aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/main.rs')
-rw-r--r--xtask/src/main.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
index 76ce04bd..7eada917 100644
--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -87,12 +87,14 @@ fn main() -> anyhow::Result<()> {
let targets = [ARMV7M, ARMV6M];
let examples: Vec<_> = std::fs::read_dir("./examples")?
- .filter_map(|path| {
- path.map(|p| p.path().file_stem().unwrap().to_str().unwrap().to_string())
- .ok()
- })
+ .filter_map(|p| p.ok())
+ .map(|p| p.path())
+ .filter(|p| p.display().to_string().ends_with(".rs"))
+ .map(|path| path.file_stem().unwrap().to_str().unwrap().to_string())
.collect();
+ println!("examples: {examples:?}");
+
let opts = Options::from_args();
let target = &opts.target;