Skip to content

Commit

Permalink
Change all enums from Rust enums to typed constants (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleMayes committed Oct 6, 2016
1 parent ad92f2f commit eed17fd
Show file tree
Hide file tree
Showing 4 changed files with 648 additions and 624 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [0.11.0] - UNRELEASED

### Changed
- Changed all enums from Rust enums to typed constants to avoid
[undefined behavior](https://github.com/KyleMayes/clang-sys/issues/42)

## [0.10.1] - 2016-08-21

### Changed
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const SEARCH_WINDOWS: &'static [&'static str] = &[
/// Searches for a library, returning the directory it can be found in if the search was successful.
fn find(file: &str, env: &str) -> Result<PathBuf, String> {
// Search the directory provided by the relevant environment variable, if set.
if let Some(directory) = env::var(env).map(|d| Path::new(&d).to_path_buf()).ok() {
if let Ok(directory) = env::var(env).map(|d| Path::new(&d).to_path_buf()) {
if contains(&directory, file) {
return Ok(directory);
}
Expand Down
Loading

0 comments on commit eed17fd

Please sign in to comment.