1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00

fix zokrates_js build script, filter .zok files

This commit is contained in:
dark64 2022-08-23 12:53:47 +02:00
parent 6f8220e6a9
commit f4789d4b04

View file

@ -14,7 +14,13 @@ fn export_stdlib() {
for entry in WalkDir::new(root) for entry in WalkDir::new(root)
.into_iter() .into_iter()
.map(Result::unwrap) .map(Result::unwrap)
.filter(|e| !e.file_type().is_dir()) .filter(|e| {
!e.file_type().is_dir()
&& e.file_name()
.to_str()
.map(|s| s.ends_with(".zok"))
.unwrap_or(false)
})
{ {
let path: &Path = entry.path(); let path: &Path = entry.path();
let source = fs::read_to_string(path).unwrap(); let source = fs::read_to_string(path).unwrap();