Move cxx header search to method of Includes
diff --git a/gen/src/builtin.rs b/gen/src/builtin.rs
index 60bbf43..adcd048 100644
--- a/gen/src/builtin.rs
+++ b/gen/src/builtin.rs
@@ -48,11 +48,6 @@
let builtin = &mut out.builtin;
let out = &mut builtin.content;
- let cxx_header = include
- .custom
- .iter()
- .any(|header| header.path == "rust/cxx.h" || header.path == "rust\\cxx.h");
-
if builtin.rust_string {
include.array = true;
include.cstdint = true;
@@ -132,6 +127,7 @@
out.begin_block(Block::Namespace("rust"));
out.begin_block(Block::InlineNamespace("cxxbridge1"));
+ let cxx_header = include.has_cxx_header();
if !cxx_header {
writeln!(out, "// #include \"rust/cxx.h\"");