diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b0ddb9..4bb0735 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/jmdict-enums/build.rs b/jmdict-enums/build.rs index b38e422..d0b56d4 100644 --- a/jmdict-enums/build.rs +++ b/jmdict-enums/build.rs @@ -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 {