Skip to content

Commit e32d69a

Browse files
authored
Added assembly files to freertos_port_files() (#76)
1 parent 94c5249 commit e32d69a

File tree

1 file changed

+9
-5
lines changed
  • freertos-cargo-build/src

1 file changed

+9
-5
lines changed

freertos-cargo-build/src/lib.rs

+9-5
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,16 @@ impl Builder {
140140
.into_iter()
141141
.filter_map(|e| e.ok())
142142
.filter_map(|entry| {
143-
let f_name = entry.path().to_str().unwrap();
144-
145-
if f_name.ends_with(".c") {
146-
return Some(entry.path().to_owned());
143+
match entry
144+
.path()
145+
.extension()
146+
.map(|s| s.to_string_lossy())
147+
.as_ref()
148+
.map(|s| s.as_ref())
149+
{
150+
Some("c" | "s" | "S") => Some(entry.path().to_owned()),
151+
_ => None,
147152
}
148-
None
149153
})
150154
.collect();
151155
files

0 commit comments

Comments
 (0)