Skip to content

Commit

Permalink
fix compile if both version 3_5 and 3_8 are set
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Nov 5, 2023
1 parent 4feab47 commit 6fe25ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion odbc-api/Cargo.toml
Expand Up @@ -48,7 +48,9 @@ narrow=[]
# `odbc-api` uses ODBC 3.80 by default, which is well supported both in windows and on linux through
# `UnixODBC`. Yet iodbc, for now does only support ODBC 3.5, so you can set this flag in order to
# include only symbols available in ODBC 3.5 and create an environment which declares the ODBC
# version to be 3.0 which works together with the iodbc driver manager.
# version to be 3.0 which works together with the iodbc driver manager. If you want to use ODBC 3.5
# please take care to deactivate default features to not have the ODBC version 3.80 feature active
# at the same time.
odbc_version_3_5 = ["odbc-sys/odbc_version_3_50"]

# The ODBC version your application should declare if it runs on windows, or on linux using
Expand Down
5 changes: 2 additions & 3 deletions odbc-api/src/error.rs
Expand Up @@ -28,11 +28,10 @@ impl TooLargeBufferSize {
}
}

#[cfg(feature = "odbc_version_3_80")]
const ODBC_VERSION_STRING: &str = "3.80";

#[cfg(feature = "odbc_version_3_5")]
const ODBC_VERSION_STRING: &str = "3.5";
#[cfg(not(feature = "odbc_version_3_5"))]
const ODBC_VERSION_STRING: &str = "3.80";

#[derive(Debug, ThisError)]
/// Error type used to indicate a low level ODBC call returned with SQL_ERROR.
Expand Down

0 comments on commit 6fe25ac

Please sign in to comment.