From 665cdb288102e8abd0edb5df2f613bc912a453dc Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Tue, 10 Mar 2026 20:53:14 +0000 Subject: [PATCH] Run lint & format --- Cargo.lock | 128 ++++++++++++++++++++++ examples/compare-with-diff-match-patch.rs | 9 +- examples/website/src/index.ts | 11 +- 3 files changed, 143 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c512cbc..aebfd4a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "async-trait" version = "0.1.89" @@ -53,6 +62,19 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-link", +] + [[package]] name = "console" version = "0.15.11" @@ -75,12 +97,28 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + [[package]] name = "diff" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" +[[package]] +name = "diff-match-patch-rs" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1e836eb966678daed8789e698dbdb1016a260c3cdaca6172585e13580c4e4be" +dependencies = [ + "chrono", + "percent-encoding", +] + [[package]] name = "encode_unicode" version = "1.0.0" @@ -105,6 +143,30 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "indexmap" version = "2.12.0" @@ -154,6 +216,12 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + [[package]] name = "memchr" version = "2.7.6" @@ -207,6 +275,12 @@ version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + [[package]] name = "pretty_assertions" version = "1.4.1" @@ -240,6 +314,7 @@ name = "reconcile-text" version = "0.8.0" dependencies = [ "console_error_panic_hook", + "diff-match-patch-rs", "insta", "pretty_assertions", "serde", @@ -569,12 +644,65 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-sys" version = "0.59.0" diff --git a/examples/compare-with-diff-match-patch.rs b/examples/compare-with-diff-match-patch.rs index 4e1eede..dac6d6c 100644 --- a/examples/compare-with-diff-match-patch.rs +++ b/examples/compare-with-diff-match-patch.rs @@ -85,8 +85,11 @@ fn main() { // reconcile-text understands both edits relative to the common ancestor // and keeps both. try_merge( - "We used the existing parsing approach for processing. The output was saved to the database.", - "We used the existing parsing approach for processing. Always validate the schema! The output was saved to the database.", - "We adopted a brand new analysis pipeline for execution. The results were written to cloud storage.", + "We used the existing parsing approach for processing. The output was saved to the \ + database.", + "We used the existing parsing approach for processing. Always validate the schema! The \ + output was saved to the database.", + "We adopted a brand new analysis pipeline for execution. The results were written to \ + cloud storage.", ); } diff --git a/examples/website/src/index.ts b/examples/website/src/index.ts index 721331d..9ce99a5 100644 --- a/examples/website/src/index.ts +++ b/examples/website/src/index.ts @@ -28,7 +28,10 @@ async function main(): Promise { rightTextArea.addEventListener('input', scheduleUpdate); document.addEventListener('selectionchange', () => { - if (document.activeElement === leftTextArea || document.activeElement === rightTextArea) { + if ( + document.activeElement === leftTextArea || + document.activeElement === rightTextArea + ) { scheduleUpdate(); } }); @@ -112,7 +115,11 @@ function updateMergedText(): void { for (const character of text) { let className = history; - if (!isDelete && selectionStart <= currentPosition && currentPosition < selectionEnd) { + if ( + !isDelete && + selectionStart <= currentPosition && + currentPosition < selectionEnd + ) { className += ` selection-${selectionSide}`; }