diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2023-01-08 19:56:47 +0100 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2023-03-01 00:33:28 +0100 |
| commit | 35c97b61c17a30de675eb1c7f852a100b200a0c2 (patch) | |
| tree | a4228d68aeab2f5aa32b26649e5664d20adfa729 /xtask | |
| parent | ceaf3613d3256f60b139a4f93220e3c298603b83 (diff) | |
All examples pass with `cargo xtask --target all`
Diffstat (limited to 'xtask')
| -rw-r--r-- | xtask/src/main.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 76ce04b..7eada91 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; |
