From ad816f6903c8dc9f3fc30ee6c32b992b73c02ecf Mon Sep 17 00:00:00 2001 From: Wojciech Graj Date: Tue, 22 Oct 2024 19:24:20 +0200 Subject: [PATCH] Impose non_exhaustive on Error --- CHANGELOG.md | 1 + bin-proto/src/error.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d95a50..f005493 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # v0.5.1 - Make `write_value` field in `#[protocol(tag(...))]` only required when deriving `ProtocolWrite` +- Impose `non_exhaustive` on `Error` # v0.5.0 - Split `Protocol` into `ProtocolRead` and `ProtocolWrite` - Split `ExternallyLengthPrefixed` into `TaggedRead` and `UntaggedWrite` diff --git a/bin-proto/src/error.rs b/bin-proto/src/error.rs index d2b21eb..01d8148 100644 --- a/bin-proto/src/error.rs +++ b/bin-proto/src/error.rs @@ -1,6 +1,7 @@ pub type Result = std::result::Result; #[derive(Debug, thiserror::Error)] +#[non_exhaustive] pub enum Error { #[error(transparent)] IO(#[from] std::io::Error),