Skip to content

Commit b5031ac

Browse files
committed
check
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent f2532cb commit b5031ac

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

vortex-duckdb/build.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,7 @@ fn c2rust(crate_dir: &Path, duckdb_include_dir: &Path) {
316316
exit(1);
317317
}
318318
};
319-
let out_path = crate_dir.join("src/cpp.rs");
320-
let new_contents = bindings.to_string();
321-
let write = match fs::read_to_string(&out_path) {
322-
Ok(existing) => existing != new_contents,
323-
Err(_) => true,
324-
};
325-
if write && let Err(e) = fs::write(&out_path, new_contents) {
319+
if let Err(e) = bindings.write_to_file(crate_dir.join("src/cpp.rs")) {
326320
println!("cargo:error=Failed to write Rust bindings: {e}");
327321
exit(1);
328322
}

0 commit comments

Comments
 (0)