mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-02 00:43:57 +00:00
[rust] Derive Eq + PartialEq on FieldLoc and FlatBufferBuilder (#5394)
This commit is contained in:
@@ -31,7 +31,7 @@ use vector::{SafeSliceAccess, Vector};
|
|||||||
|
|
||||||
pub const N_SMALLVEC_STRING_VECTOR_CAPACITY: usize = 16;
|
pub const N_SMALLVEC_STRING_VECTOR_CAPACITY: usize = 16;
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||||
struct FieldLoc {
|
struct FieldLoc {
|
||||||
off: UOffsetT,
|
off: UOffsetT,
|
||||||
id: VOffsetT,
|
id: VOffsetT,
|
||||||
@@ -40,7 +40,7 @@ struct FieldLoc {
|
|||||||
/// FlatBufferBuilder builds a FlatBuffer through manipulating its internal
|
/// FlatBufferBuilder builds a FlatBuffer through manipulating its internal
|
||||||
/// state. It has an owned `Vec<u8>` that grows as needed (up to the hardcoded
|
/// state. It has an owned `Vec<u8>` that grows as needed (up to the hardcoded
|
||||||
/// limit of 2GiB, which is set by the FlatBuffers format).
|
/// limit of 2GiB, which is set by the FlatBuffers format).
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
pub struct FlatBufferBuilder<'fbb> {
|
pub struct FlatBufferBuilder<'fbb> {
|
||||||
owned_buf: Vec<u8>,
|
owned_buf: Vec<u8>,
|
||||||
head: usize,
|
head: usize,
|
||||||
|
|||||||
Reference in New Issue
Block a user