Fix 'GenericDecodeError' and 'GenericEncodeError' not implementing 'Eq';

This commit is contained in:
Gabriel Bjørnager Jensen 2025-04-03 12:23:49 +02:00
parent 9520130eb3
commit 677c1ebcbc
4 changed files with 8 additions and 2 deletions

View file

@ -3,6 +3,10 @@
This is the changelog of [Oct](https://crates.io/crates/oct/).
See `README.md` for more information.
## 0.21.1
* Fix `GenericDecodeError` and `GenericEncodeError` not implementing `Eq`
## 0.21.0
* Again lock `SystemTimeDecodeError` behind the `std` feature

View file

@ -9,7 +9,7 @@ members = ["oct", "oct-benchmarks", "oct-macros"]
resolver = "2"
[workspace.package]
version = "0.21.0"
version = "0.21.1"
authors = ["Gabriel Bjørnager Jensen"]
readme = "README.md"
repository = "https://mandelbrot.dk/bjoernager/oct/"

View file

@ -29,7 +29,7 @@ use crate::error::SystemTimeDecodeError;
/// Manual implementors are recommended to use a custom or less generic type for the sake of efficiency.
#[must_use]
#[non_exhaustive]
#[derive(Debug, PartialEq)]
#[derive(Debug, Eq, PartialEq)]
pub enum GenericDecodeError {
/// A string contained a non-UTF-8 sequence.
BadString(Utf8Error),

View file

@ -66,6 +66,8 @@ impl Error for GenericEncodeError {
}
}
impl Eq for GenericEncodeError { }
impl From<BorrowError> for GenericEncodeError {
#[inline(always)]
fn from(value: BorrowError) -> Self {