Skip to content

Commit b57fc19

Browse files
Use CargoCallbacks::new() in tutorial
1 parent 46c06e5 commit b57fc19

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

book/src/tutorial-3.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ fn main() {
2121
// shared library.
2222
println!("cargo:rustc-link-lib=bz2");
2323
24-
// Tell cargo to invalidate the built crate whenever the wrapper changes
25-
println!("cargo:rerun-if-changed=wrapper.h");
26-
2724
// The bindgen::Builder is the main entry point
2825
// to bindgen, and lets you build up options for
2926
// the resulting bindings.
@@ -33,7 +30,7 @@ fn main() {
3330
.header("wrapper.h")
3431
// Tell cargo to invalidate the built crate whenever any of the
3532
// included header files changed.
36-
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
33+
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
3734
// Finish the builder and generate the bindings.
3835
.generate()
3936
// Unwrap the Result and panic on failure.

0 commit comments

Comments
 (0)