From 81ab90628bc1fe92a6fa91b86de6e156d5973ead Mon Sep 17 00:00:00 2001 From: Jing Peng Date: Mon, 6 Nov 2023 16:17:59 -0500 Subject: [PATCH] libsql-sys: fix path to sqlite3.c in build.rs --- libsql-sys/build.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libsql-sys/build.rs b/libsql-sys/build.rs index 98f58d5da7..95e8b35c6c 100644 --- a/libsql-sys/build.rs +++ b/libsql-sys/build.rs @@ -13,10 +13,9 @@ fn main() { } pub fn build_bundled(out_dir: &str, out_path: &Path) { - let bindings_dir = if std::env::var("LIBSQL_REGENERATE_BINDINGS").is_ok() { + if std::env::var("LIBSQL_REGENERATE_BINDINGS").is_ok() { let header = HeaderLocation::FromPath(format!("bundled/src/sqlite3.h")); bindings::write_to_out_dir(header, out_path); - out_path.display().to_string() } else { let bindgen_rs_path = if cfg!(feature = "session") { "bundled/bindings/session_bindgen.rs" @@ -25,9 +24,9 @@ pub fn build_bundled(out_dir: &str, out_path: &Path) { }; let dir = env!("CARGO_MANIFEST_DIR"); std::fs::copy(format!("{dir}/{bindgen_rs_path}"), out_path).unwrap(); - "bundled/src".to_string() - }; + } + let bindings_dir = "bundled/src".to_string(); println!("cargo:rerun-if-changed={bindings_dir}/sqlite3.c"); let mut cfg = cc::Build::new(); cfg.file(format!("{bindings_dir}/sqlite3.c"))