diff options
Diffstat (limited to 'src/options.rs')
-rw-r--r-- | src/options.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/options.rs b/src/options.rs index c65a80fc..07195bfe 100644 --- a/src/options.rs +++ b/src/options.rs @@ -428,15 +428,15 @@ where } if let Some(what_to_generate) = matches.value_of("generate") { - let mut config = CodegenConfig::nothing(); + let mut config = CodegenConfig::empty(); for what in what_to_generate.split(",") { match what { - "functions" => config.functions = true, - "types" => config.types = true, - "vars" => config.vars = true, - "methods" => config.methods = true, - "constructors" => config.constructors = true, - "destructors" => config.destructors = true, + "functions" => config.insert(CodegenConfig::FUNCTIONS), + "types" => config.insert(CodegenConfig::TYPES), + "vars" => config.insert(CodegenConfig::VARS), + "methods" => config.insert(CodegenConfig::METHODS), + "constructors" => config.insert(CodegenConfig::CONSTRUCTORS), + "destructors" => config.insert(CodegenConfig::DESTRUCTORS), otherwise => { return Err(Error::new( ErrorKind::Other, |