Skip to content

Commit

Permalink
specify non_exhaustive=false for Rust enums
Browse files Browse the repository at this point in the history
  • Loading branch information
tathanhdinh committed Jun 28, 2019
1 parent 6e4a752 commit dea90e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -14,4 +14,4 @@ licence-file = "LICENSE"
[dependencies]

[build-dependencies]
bindgen = "0.49.2"
bindgen = "0.49.3"
2 changes: 1 addition & 1 deletion build.rs
Expand Up @@ -16,7 +16,7 @@ fn main() {
// and functions only.
.whitelist_function("xc_.*")
// Keep C's enums as Rust's enums.
.default_enum_style(bindgen::EnumVariation::Rust)
.default_enum_style(bindgen::EnumVariation::Rust { non_exhaustive: false })
// Finish the builder and generate the bindings.
.generate()
// Unwrap the Result and panic on failure.
Expand Down

0 comments on commit dea90e2

Please sign in to comment.