From 9558fec211299fa51f1df72e32e75e4ba0365349 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Mon, 19 Jun 2023 09:02:15 +0100 Subject: Add RecordIndex data structure (#1059) * Add RecordIndex data structure This allows us to compare two sets of record stores, and return a list of diffs. With these diffs, we should be able to sync the two stores * Remove server handler, will follow up with this * Make clippy happy * Add tests and docs for diffs in both directions * Update atuin-common/src/record.rs Co-authored-by: Conrad Ludgate --------- Co-authored-by: Conrad Ludgate --- Cargo.lock | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index d6846dd7..d019fd45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -176,6 +176,7 @@ name = "atuin-common" version = "15.0.0" dependencies = [ "chrono", + "pretty_assertions", "rand", "serde", "typed-builder", @@ -600,6 +601,22 @@ dependencies = [ "typenum", ] +[[package]] +name = "ctor" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" +dependencies = [ + "quote", + "syn 1.0.99", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + [[package]] name = "digest" version = "0.10.5" @@ -1434,6 +1451,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "output_vt100" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" +dependencies = [ + "winapi", +] + [[package]] name = "overload" version = "0.1.1" @@ -1598,6 +1624,18 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +[[package]] +name = "pretty_assertions" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" +dependencies = [ + "ctor", + "diff", + "output_vt100", + "yansi", +] + [[package]] name = "proc-macro2" version = "1.0.56" @@ -2976,6 +3014,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + [[package]] name = "zeroize" version = "1.6.0" -- cgit v1.3.1