mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-26 20:00:32 +00:00
Only run the selected example, not all of them (#4057)
This commit is contained in:
parent
a84d3cc89f
commit
2a06d38141
@ -135,9 +135,10 @@ pub fn examples(workspace: &Path, mut args: ExamplesArgs, action: CargoAction) -
|
||||
// Sort all examples by name:
|
||||
examples.sort_by_key(|a| a.binary_name());
|
||||
|
||||
let mut filtered = examples.clone();
|
||||
let mut filtered = vec![];
|
||||
|
||||
if let Some(example) = args.example.as_deref() {
|
||||
filtered.clone_from(&examples);
|
||||
if !example.eq_ignore_ascii_case("all") {
|
||||
// Only keep the example the user wants
|
||||
filtered.retain(|ex| ex.matches_name(example));
|
||||
|
Loading…
x
Reference in New Issue
Block a user