diff --git a/examples/avro_kafka.rs b/examples/avro_kafka.rs index 0ee461a5b77..5fb392fd93a 100644 --- a/examples/avro_kafka.rs +++ b/examples/avro_kafka.rs @@ -4,7 +4,7 @@ use arrow2::{ io::avro, }; -fn read_schema_id(reader: &mut R) -> Result { +fn read_schema_id(reader: &mut R) -> Result { let mut header = [0; 5]; reader.read_exact(&mut header)?; @@ -13,7 +13,7 @@ fn read_schema_id(reader: &mut R) -> Result { "Avro requires the first byte to be a zero".to_string(), )); } - Ok(i32::from_be_bytes(header[1..].try_into().unwrap())) + Ok(u32::from_be_bytes(header[1..].try_into().unwrap())) } fn read_block(reader: &mut R, block: &mut avro::Block) -> Result<(), Error> {