Skip to content

Commit

Permalink
Bump flatbuffers (#499)
Browse files Browse the repository at this point in the history
Signed-off-by: Chojan Shang <psiace@outlook.com>
  • Loading branch information
Chojan Shang authored and alamb committed Jun 24, 2021
1 parent 43b4f72 commit 36e9a40
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ regex = "1.3"
lazy_static = "1.4"
packed_simd = { version = "0.3.4", optional = true, package = "packed_simd_2" }
chrono = "0.4"
flatbuffers = "=0.8.4"
flatbuffers = { version = "=2.0.0", optional = true }
hex = "0.4"
prettytable-rs = { version = "0.8.0", optional = true }
lexical-core = "^0.7"
Expand Down
12 changes: 6 additions & 6 deletions arrow/src/ipc/gen/Message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl<'a> flatbuffers::Follow<'a> for CompressionType {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i8>(buf, loc) };
Self(b)
}
}
Expand All @@ -85,7 +85,7 @@ impl flatbuffers::Push for CompressionType {
type Output = CompressionType;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i8>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i8>(dst, self.0) };
}
}

Expand Down Expand Up @@ -173,7 +173,7 @@ impl<'a> flatbuffers::Follow<'a> for BodyCompressionMethod {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i8>(buf, loc) };
Self(b)
}
}
Expand All @@ -182,7 +182,7 @@ impl flatbuffers::Push for BodyCompressionMethod {
type Output = BodyCompressionMethod;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i8>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i8>(dst, self.0) };
}
}

Expand Down Expand Up @@ -292,7 +292,7 @@ impl<'a> flatbuffers::Follow<'a> for MessageHeader {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
Self(b)
}
}
Expand All @@ -301,7 +301,7 @@ impl flatbuffers::Push for MessageHeader {
type Output = MessageHeader;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<u8>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<u8>(dst, self.0) };
}
}

Expand Down
40 changes: 20 additions & 20 deletions arrow/src/ipc/gen/Schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl<'a> flatbuffers::Follow<'a> for MetadataVersion {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
Expand All @@ -105,7 +105,7 @@ impl flatbuffers::Push for MetadataVersion {
type Output = MetadataVersion;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i16>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}

Expand Down Expand Up @@ -217,7 +217,7 @@ impl<'a> flatbuffers::Follow<'a> for Feature {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i64>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i64>(buf, loc) };
Self(b)
}
}
Expand All @@ -226,7 +226,7 @@ impl flatbuffers::Push for Feature {
type Output = Feature;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i64>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i64>(dst, self.0) };
}
}

Expand Down Expand Up @@ -305,7 +305,7 @@ impl<'a> flatbuffers::Follow<'a> for UnionMode {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
Expand All @@ -314,7 +314,7 @@ impl flatbuffers::Push for UnionMode {
type Output = UnionMode;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i16>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}

Expand Down Expand Up @@ -396,7 +396,7 @@ impl<'a> flatbuffers::Follow<'a> for Precision {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
Expand All @@ -405,7 +405,7 @@ impl flatbuffers::Push for Precision {
type Output = Precision;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i16>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}

Expand Down Expand Up @@ -484,7 +484,7 @@ impl<'a> flatbuffers::Follow<'a> for DateUnit {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
Expand All @@ -493,7 +493,7 @@ impl flatbuffers::Push for DateUnit {
type Output = DateUnit;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i16>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}

Expand Down Expand Up @@ -586,7 +586,7 @@ impl<'a> flatbuffers::Follow<'a> for TimeUnit {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
Expand All @@ -595,7 +595,7 @@ impl flatbuffers::Push for TimeUnit {
type Output = TimeUnit;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i16>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}

Expand Down Expand Up @@ -675,7 +675,7 @@ impl<'a> flatbuffers::Follow<'a> for IntervalUnit {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
Expand All @@ -684,7 +684,7 @@ impl flatbuffers::Push for IntervalUnit {
type Output = IntervalUnit;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i16>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}

Expand Down Expand Up @@ -853,7 +853,7 @@ impl<'a> flatbuffers::Follow<'a> for Type {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
Self(b)
}
}
Expand All @@ -862,7 +862,7 @@ impl flatbuffers::Push for Type {
type Output = Type;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<u8>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<u8>(dst, self.0) };
}
}

Expand Down Expand Up @@ -944,7 +944,7 @@ impl<'a> flatbuffers::Follow<'a> for DictionaryKind {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
Expand All @@ -953,7 +953,7 @@ impl flatbuffers::Push for DictionaryKind {
type Output = DictionaryKind;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i16>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}

Expand Down Expand Up @@ -1034,7 +1034,7 @@ impl<'a> flatbuffers::Follow<'a> for Endianness {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
Expand All @@ -1043,7 +1043,7 @@ impl flatbuffers::Push for Endianness {
type Output = Endianness;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i16>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}

Expand Down
8 changes: 4 additions & 4 deletions arrow/src/ipc/gen/SparseTensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl<'a> flatbuffers::Follow<'a> for SparseMatrixCompressedAxis {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
Self(b)
}
}
Expand All @@ -86,7 +86,7 @@ impl flatbuffers::Push for SparseMatrixCompressedAxis {
type Output = SparseMatrixCompressedAxis;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<i16>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
}
}

Expand Down Expand Up @@ -180,7 +180,7 @@ impl<'a> flatbuffers::Follow<'a> for SparseTensorIndex {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
Self(b)
}
}
Expand All @@ -189,7 +189,7 @@ impl flatbuffers::Push for SparseTensorIndex {
type Output = SparseTensorIndex;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<u8>(dst, self.0);
unsafe { flatbuffers::emplace_scalar::<u8>(dst, self.0) };
}
}

Expand Down

0 comments on commit 36e9a40

Please sign in to comment.