Switch next_if to next as we already know it's of type Binary

This commit is contained in:
Stefan Stanciulescu 2021-11-03 22:48:12 +01:00
parent 112ebe1842
commit 260838e5ea

View File

@ -71,7 +71,7 @@ fn first_helper(
if input_peek.peek().is_some() {
match input_peek.peek().unwrap().get_type() {
Type::Binary => {
match &mut input_peek.next_if(|val| val.get_type() == Type::Binary) {
match &mut input_peek.next() {
Some(v) => match &v {
Value::Binary { val, .. } => {
let bytes = val;