ok_or
This commit is contained in:
parent
dc229363af
commit
cfff3c39b9
@ -83,13 +83,13 @@ impl<'a, Ctx: Context<'a>> SingularResolver<'a, Ctx> {
|
||||
self: Arc<Self>,
|
||||
address: Address,
|
||||
) -> Result<HashResolution<'a, Ctx>, SingularityError> {
|
||||
let point =
|
||||
self.points
|
||||
.get(address.index)
|
||||
.ok_or_else(|| SingularityError::OutOfBounds {
|
||||
index: address.index,
|
||||
len: self.points.len(),
|
||||
})?;
|
||||
let point = self
|
||||
.points
|
||||
.get(address.index)
|
||||
.ok_or(SingularityError::OutOfBounds {
|
||||
index: address.index,
|
||||
len: self.points.len(),
|
||||
})?;
|
||||
if point.s_hash() != address.point {
|
||||
Err(SingularityError::Mismatch {
|
||||
index: address.index,
|
||||
|
Loading…
Reference in New Issue
Block a user