Skip to content

Commit

Permalink
book/building: Fix expect_build() call
Browse files Browse the repository at this point in the history
`expect_build()` does not seem to be a thing (anymore)? The tutorial uses `build()?`, so I've adapted the snippet to use `build().unwrap()` since the snippet is not using `miette` at the moment.
  • Loading branch information
Turbo87 authored Jan 6, 2025
1 parent bea6877 commit 8750b63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion book/src/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ fn main() {
let path = std::path::PathBuf::from("src"); // include path
let mut b = autocxx_build::Builder::new("src/main.rs", &[&path])
.extra_clang_args(&["-std=c++17"])
.expect_build();
.build()
.unwrap();
b.flag_if_supported("-std=c++17") // use "-std:c++17" here if using msvc on windows
.compile("autocxx-demo"); // arbitrary library name, pick anything
println!("cargo:rerun-if-changed=src/main.rs");
Expand Down

0 comments on commit 8750b63

Please sign in to comment.