diff options
author | jean-airoldie <25088801+jean-airoldie@users.noreply.github.com> | 2019-06-06 17:09:58 -0400 |
---|---|---|
committer | Robert <rw@users.noreply.github.com> | 2019-06-06 14:09:58 -0700 |
commit | 16aef8ac0d97e8ddf880386550c3f8e0856e4842 (patch) | |
tree | 5f3e9b3a717d4900d538de0c8286654e4c93888a /rust | |
parent | b59a1ca2f84e47ad3d18b3676a732eb7f6117cae (diff) | |
download | flatbuffers-16aef8ac0d97e8ddf880386550c3f8e0856e4842.tar.gz flatbuffers-16aef8ac0d97e8ddf880386550c3f8e0856e4842.tar.bz2 flatbuffers-16aef8ac0d97e8ddf880386550c3f8e0856e4842.zip |
[rust] Derive Eq + PartialEq on FieldLoc and FlatBufferBuilder (#5394)
Diffstat (limited to 'rust')
-rw-r--r-- | rust/flatbuffers/src/builder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/flatbuffers/src/builder.rs b/rust/flatbuffers/src/builder.rs index 68cb434b..47301352 100644 --- a/rust/flatbuffers/src/builder.rs +++ b/rust/flatbuffers/src/builder.rs @@ -31,7 +31,7 @@ use vector::{SafeSliceAccess, Vector}; pub const N_SMALLVEC_STRING_VECTOR_CAPACITY: usize = 16; -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] struct FieldLoc { off: UOffsetT, id: VOffsetT, @@ -40,7 +40,7 @@ struct FieldLoc { /// FlatBufferBuilder builds a FlatBuffer through manipulating its internal /// 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). -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Eq, PartialEq)] pub struct FlatBufferBuilder<'fbb> { owned_buf: Vec<u8>, head: usize, |