Eliminate need for lifetimes in write::gen signature
diff --git a/gen/src/mod.rs b/gen/src/mod.rs
index 2cd4e56..554334c 100644
--- a/gen/src/mod.rs
+++ b/gen/src/mod.rs
@@ -136,12 +136,12 @@
// one or the other.
Ok(GeneratedCode {
header: if opt.gen_header {
- write::gen(apis, types, opt, true).content()
+ write::gen(apis, types, opt, true)
} else {
Vec::new()
},
implementation: if opt.gen_implementation {
- write::gen(apis, types, opt, false).content()
+ write::gen(apis, types, opt, false)
} else {
Vec::new()
},
diff --git a/gen/src/write.rs b/gen/src/write.rs
index c008fcb..57c699c 100644
--- a/gen/src/write.rs
+++ b/gen/src/write.rs
@@ -10,7 +10,7 @@
use proc_macro2::Ident;
use std::collections::HashMap;
-pub(super) fn gen<'a>(apis: &[Api], types: &'a Types, opt: &'a Opt, header: bool) -> OutFile<'a> {
+pub(super) fn gen(apis: &[Api], types: &Types, opt: &Opt, header: bool) -> Vec<u8> {
let mut out_file = OutFile::new(header, opt, types);
let out = &mut out_file;
@@ -33,7 +33,7 @@
builtin::write(out);
include::write(out);
- out_file
+ out_file.content()
}
fn gen_namespace_forward_declarations(out: &mut OutFile, ns_entries: &NamespaceEntries) {