Skip to content

Commit

Permalink
Fix last error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden authored and claravanstaden committed Nov 22, 2022
1 parent 6b31096 commit ab797ba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ssz-rs/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ use std::marker::PhantomData;

#[derive(Debug)]
pub enum ListError {
IncorrectLength { expected: usize, provided: usize }, // elements given that exceeds the list bound of
IncorrectLength { expected: usize, provided: usize },
}

impl Display for ListError {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
match *self {
ListError::IncorrectLength{ expected, provided } => write!(f, "{} elements given that exceeds the list bound of {}", provided, expected),
}
}
}

/// A homogenous collection of a variable number of values.
Expand Down

0 comments on commit ab797ba

Please sign in to comment.