Skip to content

Commit

Permalink
add derive_default
Browse files Browse the repository at this point in the history
  • Loading branch information
arnabcs17b006 committed Sep 1, 2020
1 parent 175e2aa commit 8b626cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ fn main() {
// bindings for.
.header(XEN_HEADERS_WRAPPER)
// Keep C's enums as Rust's enums.
.default_enum_style(bindgen::EnumVariation::Rust{ non_exhaustive: false })
.default_enum_style(bindgen::EnumVariation::Rust {
non_exhaustive: false,
})
// Disable data layout tests.
.layout_tests(false)
// Run rustfmt on the bindings
.rustfmt_bindings(true)
//initialize structs with default values
.derive_default(true)
// Finish the builder and generate the bindings.
.generate()
// Unwrap the Result and panic on failure.
Expand Down
1 change: 1 addition & 0 deletions src/wrapper.h
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include <xenctrl.h>

0 comments on commit 8b626cb

Please sign in to comment.