From 14ecfe4236c7957127cce3fcefbc4d8434dcedb1 Mon Sep 17 00:00:00 2001 From: Casper Date: Wed, 28 Oct 2020 19:23:22 -0700 Subject: [PATCH] Updated comments and fixed a fundamental type error. (#6214) * Updated comments and fixed a fundemental type error. * bump rust flatbuffers semver Co-authored-by: Casper Neo --- rust/flatbuffers/Cargo.toml | 2 +- rust/flatbuffers/src/primitives.rs | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/rust/flatbuffers/Cargo.toml b/rust/flatbuffers/Cargo.toml index 2afb31c70..460c55220 100644 --- a/rust/flatbuffers/Cargo.toml +++ b/rust/flatbuffers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flatbuffers" -version = "0.6.3" +version = "0.7.0" edition = "2018" authors = ["Robert Winslow ", "FlatBuffers Maintainers"] license = "Apache-2.0" diff --git a/rust/flatbuffers/src/primitives.rs b/rust/flatbuffers/src/primitives.rs index 4b784b1b6..350e984ab 100644 --- a/rust/flatbuffers/src/primitives.rs +++ b/rust/flatbuffers/src/primitives.rs @@ -49,15 +49,14 @@ pub const SIZE_VOFFSET: usize = SIZE_I16; pub const SIZE_SIZEPREFIX: usize = SIZE_UOFFSET; -/// SOffsetT is an i32 that is used by tables to reference their vtables. +/// SOffsetT is a relative pointer from tables to their vtables. pub type SOffsetT = i32; -/// UOffsetT is a u32 that is used by pervasively to represent both pointers -/// and lengths of vectors. +/// UOffsetT is used represent both for relative pointers and lengths of vectors. pub type UOffsetT = u32; -/// VOffsetT is a i32 that is used by vtables to store field data. -pub type VOffsetT = i16; +/// VOffsetT is a relative pointer in vtables to point from tables to field data. +pub type VOffsetT = u16; /// TableFinishedWIPOffset marks a WIPOffset as being for a finished table. #[derive(Clone, Copy)]