a few more quick changes and another range loop ignore

This commit is contained in:
Grant Wuerker
2018-10-20 17:38:32 -05:00
parent 869049d099
commit d3ec313b43
3 changed files with 6 additions and 11 deletions

View File

@@ -53,11 +53,10 @@ impl Decodable for H256 {
-> Result<(Self, usize), DecodeError>
{
if bytes.len() < 32 || bytes.len() - 32 < index {
return Err(DecodeError::TooShort)
Err(DecodeError::TooShort)
}
else {
return Ok((H256::from(&bytes[index..(index + 32)]),
index + 32));
Ok((H256::from(&bytes[index..(index + 32)]), index + 32))
}
}
}