diff --git a/Cargo.lock b/Cargo.lock index f8f0dce576..ec3a32fe11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,10 +7,6 @@ name = "Inflector" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] [[package]] name = "RustyXML" @@ -64,6 +60,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + [[package]] name = "alloc-no-stdlib" version = "2.0.3" @@ -2677,19 +2679,20 @@ dependencies = [ [[package]] name = "ouroboros" -version = "0.8.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6d5c203fe8d786d9d7bec8203cbbff3eb2cf8410c0d70cfd05b3d5f5d545da" +checksum = "84236d64f1718c387232287cf036eb6632a5ecff226f4ff9dccb8c2b79ba0bde" dependencies = [ + "aliasable", "ouroboros_macro", "stable_deref_trait", ] [[package]] name = "ouroboros_macro" -version = "0.8.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "129943a960e6a08c7e70ca5a09f113c273fe7f10ae8420992c78293e3dffdf65" +checksum = "f463857a6eb96c0136b1d56e56c718350cef30412ec065b48294799a088bca68" dependencies = [ "Inflector", "proc-macro-error", diff --git a/entry/Cargo.toml b/entry/Cargo.toml index 6d59b70052..dea0e067da 100644 --- a/entry/Cargo.toml +++ b/entry/Cargo.toml @@ -13,6 +13,6 @@ data_types = { path = "../data_types" } flatbuffers = "2" snafu = "0.6" influxdb_line_protocol = { path = "../influxdb_line_protocol" } -ouroboros = "0.8.3" +ouroboros = "0.10.1" internal_types = { path = "../internal_types" } generated_types = { path = "../generated_types" } diff --git a/entry/src/entry.rs b/entry/src/entry.rs index bf7c1c120c..4f9be9f4d2 100644 --- a/entry/src/entry.rs +++ b/entry/src/entry.rs @@ -734,7 +734,6 @@ pub struct ShardedEntry { /// Wrapper type for the flatbuffer Entry struct. Has convenience methods for /// iterating through the partitioned writes. #[self_referencing] -#[derive(Debug, PartialEq)] pub struct Entry { data: Vec, #[borrows(data)] @@ -789,6 +788,21 @@ impl Clone for Entry { } } +impl PartialEq for Entry { + fn eq(&self, other: &Self) -> bool { + // just compare the de-serialized entry, not the framebuffer-encoded data because the latter one is not normalized + self.fb() == other.fb() + } +} + +impl std::fmt::Debug for Entry { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Entry") + .field("fb", &self.fb()) + .finish_non_exhaustive() + } +} + /// Wrapper struct for the flatbuffers PartitionWrite. Has convenience methods /// for iterating through the table batches. #[derive(Debug)]