renamed RlpIsNotArray to RlpExpectedToBeArray
This commit is contained in:
parent
a4db001a6a
commit
50c9d60778
@ -41,7 +41,7 @@ impl ItemInfo {
|
|||||||
pub enum DecoderError {
|
pub enum DecoderError {
|
||||||
FromBytesError(FromBytesError),
|
FromBytesError(FromBytesError),
|
||||||
RlpIsTooShort,
|
RlpIsTooShort,
|
||||||
RlpIsNotArray,
|
RlpExpectedToBeArray,
|
||||||
BadRlp,
|
BadRlp,
|
||||||
}
|
}
|
||||||
impl StdError for DecoderError {
|
impl StdError for DecoderError {
|
||||||
@ -72,7 +72,7 @@ impl <'a>Rlp<'a> {
|
|||||||
/// paren container caches searched position
|
/// paren container caches searched position
|
||||||
pub fn at(&self, index: usize) -> Result<Rlp<'a>, DecoderError> {
|
pub fn at(&self, index: usize) -> Result<Rlp<'a>, DecoderError> {
|
||||||
if !self.is_array() {
|
if !self.is_array() {
|
||||||
return Err(DecoderError::RlpIsNotArray);
|
return Err(DecoderError::RlpExpectedToBeArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
// move to cached position if it's index is less or equal to
|
// move to cached position if it's index is less or equal to
|
||||||
|
Loading…
Reference in New Issue
Block a user