Implement Error and Eq for ParseLengthError

This commit is contained in:
Nadav Ivgi 2021-01-16 13:02:22 +02:00
parent 0df86b4426
commit 55657cbffb
No known key found for this signature in database
GPG Key ID: 81F6104CD0F150FC
1 changed files with 3 additions and 1 deletions

View File

@ -494,7 +494,7 @@ construct_uint!(Uint256, 4);
construct_uint!(Uint128, 2); construct_uint!(Uint128, 2);
/// Invalid slice length /// Invalid slice length
#[derive(Debug, PartialEq, PartialOrd, Clone, Copy, Hash)] #[derive(Debug, PartialEq, Eq, PartialOrd, Clone, Copy, Hash)]
/// Invalid slice length /// Invalid slice length
pub struct ParseLengthError { pub struct ParseLengthError {
/// The length of the slice de-facto /// 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 { impl Uint256 {
/// Increment by 1 /// Increment by 1
#[inline] #[inline]