Skip to content

Commit

Permalink
Don't validate array flatbuffer messages twice (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
robert3005 authored Jun 26, 2024
1 parent 1d5a68b commit 3d915fb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions vortex-ipc/src/message_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,11 @@ impl<R: VortexRead> MessageReader<R> {
dtype,
flatbuffer,
|flatbuffer| {
root::<fb::Message>(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::<fb::Message>(flatbuffer) }
.header_as_chunk()
.unwrap()
.array()
.ok_or_else(|| vortex_err!("Chunk missing Array"))
},
buffers,
)?;
Expand Down

0 comments on commit 3d915fb

Please sign in to comment.