Skip to content

Commit ebee211

Browse files
committed
fix: zcopy and serialization options are not mutually exclusive
1 parent 87de6f8 commit ebee211

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

xdr_codegen/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ struct Args {
1717
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
1818
let args = Args::parse();
1919
let mut compiler = xdr_codegen::Compiler::new();
20+
21+
if args.zero_copy {
22+
compiler.enable_zcopy();
23+
}
24+
2025
if args.no_alloc {
2126
compiler.enable_no_alloc().disable_alloc().run()
22-
} else if args.zero_copy {
23-
compiler.disable_alloc().enable_zcopy().run()
2427
} else {
2528
compiler.run()
2629
}

0 commit comments

Comments
 (0)