diff --git a/CHANGELOG.md b/CHANGELOG.md index 71762ca..d5d75b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Unreleased +Backwards-incompatible changes: + +* Mark `Command` and `Argument` as `non_exhaustive`, to allow extending them + in the future. + Bug fixes: * Relax dependency version requirements (was tilde requirements). \ No newline at end of file diff --git a/src/command.rs b/src/command.rs index a525478..17f495d 100644 --- a/src/command.rs +++ b/src/command.rs @@ -1,5 +1,6 @@ /// A block, consisting of multiple commands. #[derive(Debug, PartialEq)] +#[non_exhaustive] pub(crate) struct Block { /// The commands in the block. pub commands: Vec, @@ -9,6 +10,7 @@ pub(crate) struct Block { /// A command. #[derive(Debug, PartialEq)] +#[non_exhaustive] pub struct Command { /// The name of the command. Never empty. pub name: String, @@ -23,6 +25,7 @@ pub struct Command { /// A command argument. #[derive(Debug, PartialEq)] +#[non_exhaustive] pub struct Argument { /// The argument key, for `key=value` style arguments. Not guaranteed to be /// unique, the [`Runner`](crate::Runner) can handle this as desired.