summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/resolver.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/resolver.rs b/src/resolver.rs
index 2ed92e7..d87fe35 100644
--- a/src/resolver.rs
+++ b/src/resolver.rs
@@ -40,11 +40,7 @@ pub fn resolve<'doc, O>(obj: &'doc O, tokens: &Token, error_if_not_found: bool)
Ok(None)
}
},
- None => {
- ary.at_index(*idx).ok_or_else(|| {
- Error::IndexOutOfBounds(*idx, obj.array_len().unwrap()) // unwrap is safe here
- })
- }
+ None => Ok(Some(obj)),
},
Token::Identifier { ref ident, .. } => Err(Error::NoIdentifierInArray(ident.clone())),
}