Skip to content

Commit

Permalink
less
Browse files Browse the repository at this point in the history
  • Loading branch information
robert3005 committed Mar 20, 2024
1 parent 15ec083 commit a83867e
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions vortex-schema/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,22 @@ fn main() {
.canonicalize()
.expect("Failed to canonicalize OUT_DIR");

WalkDir::new(&flatbuffers_dir)
let fbs_files = WalkDir::new(flatbuffers_dir)
.into_iter()
.filter_map(|e| e.ok())
.for_each(|e| rerun_if_changed(e.path()));
.filter(|e| e.path().extension() == Some(OsStr::new("fbs")))
.map(|e| {
rerun_if_changed(e.path());
e.path().to_path_buf()
})
.collect::<Vec<_>>();

if !Command::new(flatc())
.args(["--filename-suffix", ""])
.arg("--rust")
.arg("-o")
.arg(out_dir.join("flatbuffers"))
.args(
WalkDir::new(flatbuffers_dir)
.into_iter()
.filter_map(|e| e.ok())
.filter(|e| e.path().extension() == Some(OsStr::new("fbs")))
.map(|d| d.path().to_path_buf()),
)
.args(fbs_files)
.status()
.unwrap()
.success()
Expand Down

0 comments on commit a83867e

Please sign in to comment.