From 96fd13afa97f0df25ba3a3b882ae4dd8cc4c3c28 Mon Sep 17 00:00:00 2001 From: Eivind Alexander Bergem Date: Fri, 23 Aug 2024 15:02:56 +0200 Subject: [PATCH] Added assembly files to `freertos_port_files()` --- freertos-cargo-build/src/lib.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/freertos-cargo-build/src/lib.rs b/freertos-cargo-build/src/lib.rs index 434cd26..1ff1d22 100644 --- a/freertos-cargo-build/src/lib.rs +++ b/freertos-cargo-build/src/lib.rs @@ -140,12 +140,16 @@ impl Builder { .into_iter() .filter_map(|e| e.ok()) .filter_map(|entry| { - let f_name = entry.path().to_str().unwrap(); - - if f_name.ends_with(".c") { - return Some(entry.path().to_owned()); + match entry + .path() + .extension() + .map(|s| s.to_string_lossy()) + .as_ref() + .map(|s| s.as_ref()) + { + Some("c" | "s" | "S") => Some(entry.path().to_owned()), + _ => None, } - None }) .collect(); files