Skip to content

Commit

Permalink
Remove unused constant
Browse files Browse the repository at this point in the history
  • Loading branch information
George Chamor committed May 1, 2021
1 parent e18e7f5 commit c0da1b4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,18 @@ use std::path::PathBuf;
#[cfg(all(feature = "mysql", not(feature = "mariadb")))]
mod constants {
pub(crate) const FILE_NAME: &str = "src/mysql.rs";
pub(crate) const LINK_LIB: &str = "mysqlclient";
pub(crate) const BINDGEN_EXTRA_CLANG_ARGS: &str = r#"-I"/usr/include/mysql""#;
}

#[cfg(all(feature = "mariadb", not(feature = "mysql")))]
mod constants {
pub(crate) const FILE_NAME: &str = "src/mariadb.rs";
pub(crate) const LINK_LIB: &str = "mysqlclient";
// pub(crate) const LINK_LIB: &str = "mariadb";
pub(crate) const BINDGEN_EXTRA_CLANG_ARGS: &str = r#"-I"/usr/include/mariadb""#;
}

fn main() {
// Tell cargo to tell rustc to link the mysql or mariadb shared library.
println!("{}", format!("cargo:rustc-link-lib={}", constants::LINK_LIB));
println!("{}", format!("cargo:rustc-link-lib={}", "mysqlclient"));

// Tell cargo to invalidate the built crate whenever the wrapper changes
println!("cargo:rerun-if-changed=wrapper.h");
Expand Down

0 comments on commit c0da1b4

Please sign in to comment.