mark all enums as non-exhaustive

main
Stefan Majewsky 3 years ago
parent c67bd06e3f
commit f39128a0a2

@ -1,3 +1,9 @@
# v3.0.0 (TBD)
Changes:
- All enums are now marked as non-exhaustive, since the JMdict tends to add more variants as time goes on.
# v2.0.0 (2021-07-19)
JMdict was updated to 2021-09-17. This requires the following changes in enum variants:

@ -390,6 +390,7 @@ fn process(e: Enum) -> String {
//enum declaration
lines.push(format!("/// {}", e.doc));
lines.push("#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]".into());
lines.push("#[non_exhaustive]".into());
lines.push(format!("pub enum {} {{", e.name));
for v in e.variants.iter().filter(|v| v.enabled) {
if let Some(ref entities) = e.entities {

Loading…
Cancel
Save