Remove constructors in favor of public fields
diff --git a/codegen/src/parse.rs b/codegen/src/parse.rs
index 10872ea..448188d 100644
--- a/codegen/src/parse.rs
+++ b/codegen/src/parse.rs
@@ -86,7 +86,10 @@
_ => panic!("Enum representation not supported"),
};
- types::Variant::new(variant.ident.to_string(), fields)
+ types::Variant {
+ ident: variant.ident.to_string(),
+ fields,
+ }
})
.collect()
}
@@ -132,7 +135,10 @@
_ => panic!(),
};
- types::Type::Punctuated(types::Punctuated::new(nested, punct))
+ types::Type::Punctuated(types::Punctuated {
+ element: Box::new(nested),
+ punct,
+ })
}
"Vec" => {
let nested = introspect_type(first_arg(&last.arguments), items, tokens);
@@ -468,7 +474,7 @@
assert!(input.is_empty());
- Ok(types::Features::new(features))
+ Ok(types::Features { any: features })
}
}
}