Take codegen options by reference
diff --git a/gen/src/write.rs b/gen/src/write.rs
index 32ccbf6..ccb9f61 100644
--- a/gen/src/write.rs
+++ b/gen/src/write.rs
@@ -11,7 +11,7 @@
namespace: &Namespace,
apis: &[Api],
types: &Types,
- opt: Opt,
+ opt: &Opt,
header: bool,
) -> OutFile {
let mut out_file = OutFile::new(namespace.clone(), header);
@@ -21,7 +21,7 @@
writeln!(out.front, "#pragma once");
}
- out.include.extend(opt.include);
+ out.include.extend(opt.include.clone());
for api in apis {
if let Api::Include(include) = api {
out.include.insert(include);