Skip to content

Commit 5e347af

Browse files
authored
Merge pull request #1419 from Turbo87/patch-1
book/tutorial: Rename `path` variable to self-describing `include_path`
2 parents 340e672 + 9ec3d93 commit 5e347af

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

book/src/tutorial.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,16 @@ Now, add a `build.rs` next to your `Cargo.toml` (this is a standard `cargo` [bui
3333

3434
```rust,ignore
3535
fn main() -> miette::Result<()> {
36-
let path = std::path::PathBuf::from("src"); // include path
37-
let mut b = autocxx_build::Builder::new("src/main.rs", &[&path]).build()?;
38-
// This assumes all your C++ bindings are in main.rs
36+
let include_path = std::path::PathBuf::from("src");
37+
38+
// This assumes all your C++ bindings are in main.rs
39+
let mut b = autocxx_build::Builder::new("src/main.rs", &[&include_path]).build()?;
3940
b.flag_if_supported("-std=c++14")
4041
.compile("autocxx-demo"); // arbitrary library name, pick anything
4142
println!("cargo:rerun-if-changed=src/main.rs");
43+
4244
// Add instructions to link to any C++ libraries you need.
45+
4346
Ok(())
4447
}
4548
```

0 commit comments

Comments
 (0)