From d499e527f1214b2998b844720f0d41a9d05be7e1 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 17 Oct 2024 11:27:15 +0200 Subject: [PATCH] Mark Error as non-exhaustive Adding a new error variant should not be a breaking change. Fixes: https://github.com/trussed-dev/cbor-smol/issues/11 --- CHANGELOG.md | 2 +- src/error.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53fc1ed..2c3e68d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [Unreleased]: https://github.com/trussed-dev/cbor-smol/compare/0.4.1...HEAD -- +- Mark `Error` as non-exhaustive ([#11](https://github.com/trussed-dev/cbor-smol/issues/11)) ## [0.4.1][] - 2024-10-08 diff --git a/src/error.rs b/src/error.rs index 69dc0d9..e0e6b74 100644 --- a/src/error.rs +++ b/src/error.rs @@ -8,6 +8,7 @@ pub type Result = core::result::Result; /// This is the error type used by cbor-smol #[derive(Clone, Copy, Debug, Eq, PartialEq)] #[repr(u8)] +#[non_exhaustive] pub enum Error { /// This is a feature that cbor-smol will never implement WontImplement,