diff --git a/lang/rust/avro/src/decode.rs b/lang/rust/avro/src/decode.rs index 86584d3e0c1..41c3f24ab27 100644 --- a/lang/rust/avro/src/decode.rs +++ b/lang/rust/avro/src/decode.rs @@ -323,7 +323,7 @@ pub(crate) fn decode_internal>( Ok(if let Value::Int(raw_index) = decode_int(reader)? { let index = usize::try_from(raw_index) .map_err(|e| Error::ConvertI32ToUsize(e, raw_index))?; - if (0..=symbols.len()).contains(&index) { + if (0..symbols.len()).contains(&index) { let symbol = symbols[index].clone(); Value::Enum(raw_index as u32, symbol) } else {