diff --git a/vortex-ipc/src/message_reader.rs b/vortex-ipc/src/message_reader.rs index 27c1c2e05e..d4c36a9f7e 100644 --- a/vortex-ipc/src/message_reader.rs +++ b/vortex-ipc/src/message_reader.rs @@ -189,14 +189,11 @@ impl MessageReader { dtype, flatbuffer, |flatbuffer| { - root::(flatbuffer) - .map_err(VortexError::from) - .map(|msg| msg.header_as_chunk().unwrap()) - .and_then(|chunk| { - chunk - .array() - .ok_or_else(|| vortex_err!("Chunk missing Array")) - }) + unsafe { root_unchecked::(flatbuffer) } + .header_as_chunk() + .unwrap() + .array() + .ok_or_else(|| vortex_err!("Chunk missing Array")) }, buffers, )?;