Skip to content

Commit

Permalink
docs(book): fix deprecated bindgen constant in example
Browse files Browse the repository at this point in the history
  • Loading branch information
attilarepka committed Dec 26, 2024
1 parent 3e0094e commit 6c60c33
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions book/src/non-system-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ library:
use std::env;
use std::path::PathBuf;
use bindgen::CargoCallbacks;
fn main() {
// This is the directory where the `c` library is located.
let libdir_path = PathBuf::from("hello")
Expand Down Expand Up @@ -86,7 +84,7 @@ fn main() {
.header(headers_path_str)
// Tell cargo to invalidate the built crate whenever any of the
// included header files changed.
.parse_callbacks(Box::new(CargoCallbacks::new()))
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
// Finish the builder and generate the bindings.
.generate()
// Unwrap the Result and panic on failure.
Expand Down

0 comments on commit 6c60c33

Please sign in to comment.