From dea90e220843d87d30476847e5a6e7633eb4fc25 Mon Sep 17 00:00:00 2001 From: TA Thanh Dinh Date: Sat, 29 Jun 2019 01:23:34 +0200 Subject: [PATCH] specify non_exhaustive=false for Rust enums --- Cargo.toml | 2 +- build.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4bee399..2458005 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,4 +14,4 @@ licence-file = "LICENSE" [dependencies] [build-dependencies] -bindgen = "0.49.2" +bindgen = "0.49.3" diff --git a/build.rs b/build.rs index f06dfe7..ee80951 100644 --- a/build.rs +++ b/build.rs @@ -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.