From 55657cbffb353bd1e70ff2501d1141675529fd7b Mon Sep 17 00:00:00 2001 From: Nadav Ivgi Date: Sat, 16 Jan 2021 13:02:22 +0200 Subject: [PATCH] Implement Error and Eq for ParseLengthError --- src/util/uint.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/uint.rs b/src/util/uint.rs index 91b6b71d..f58bdcdb 100644 --- a/src/util/uint.rs +++ b/src/util/uint.rs @@ -494,7 +494,7 @@ construct_uint!(Uint256, 4); construct_uint!(Uint128, 2); /// Invalid slice length -#[derive(Debug, PartialEq, PartialOrd, Clone, Copy, Hash)] +#[derive(Debug, PartialEq, Eq, PartialOrd, Clone, Copy, Hash)] /// Invalid slice length pub struct ParseLengthError { /// The length of the slice de-facto @@ -509,6 +509,8 @@ impl ::std::fmt::Display for ParseLengthError { } } +impl ::std::error::Error for ParseLengthError {} + impl Uint256 { /// Increment by 1 #[inline]