Skip to content

Commit 33eff69

Browse files
committed
changed importing style
1 parent 3c86255 commit 33eff69

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

program/rust/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mod build_utils;
2-
use bindgen;
2+
use bindgen::Builder;
33
use std::collections::HashMap;
44
use std::vec::Vec;
55

@@ -16,6 +16,6 @@ fn main() {
1616
])};
1717

1818
//generate and write bindings
19-
let bindings = bindgen::Builder::default().header("./src/bindings.h").parse_callbacks(Box::new(parser)).generate().expect("Unable to generate bindings");
19+
let bindings = Builder::default().header("./src/bindings.h").parse_callbacks(Box::new(parser)).generate().expect("Unable to generate bindings");
2020
bindings.write_to_file("./bindings.rs").expect("Couldn't write bindings!");
2121
}

program/rust/build_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use bindgen;
1+
use bindgen::callbacks::ParseCallbacks;
22
use std::panic::UnwindSafe;
33
use std::collections::HashMap;
44
///This type stores a hashmap from structnames
@@ -14,7 +14,7 @@ pub struct DeriveAdderParserCallback<'a>{
1414
//this is required to implement the callback trait
1515
impl UnwindSafe for DeriveAdderParserCallback<'_> {}
1616

17-
impl bindgen::callbacks::ParseCallbacks for DeriveAdderParserCallback<'_>{
17+
impl ParseCallbacks for DeriveAdderParserCallback<'_>{
1818
fn add_derives(&self, _name: &str) -> Vec<String>{
1919
let traits = self.types_to_traits.get(_name);
2020
match traits{

0 commit comments

Comments
 (0)