Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
1
third-party/vendor/diff/.cargo-checksum.json
vendored
Normal file
1
third-party/vendor/diff/.cargo-checksum.json
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"files":{"Cargo.lock":"02caf089cd65edef991562a204a415bc99f3e19e23245f86516a7053fd9ca7ab","Cargo.toml":"c8ea71f523d7f241ff0ee61e32cb0212d2c82cc603f0734a51716f88ada2fae0","LICENSE-APACHE":"b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1","LICENSE-MIT":"c5de694d2f7a6084593c7280222149b683f084103f9627be3a22ed5eee4ce86c","README.md":"e4c66260ab73e5ef5e023aef26a5f1562c43c8c1a2a2a39e3bed4be809c79321","benches/benches.rs":"0a9662385d8508cc40815515cdbdfbd80b479c5f08840cdf5beaf0881a755ed2","examples/simple.rs":"b56bfd5a90d9ece110a0e2ac7eece6cec7e8ca92d2af8394d40f33176577e48f","src/lib.rs":"23ad78ffade95bffbea6a29c4abd15ee43b3a0078df97bb3931d09bbff208837","tests/data/gitignores.chars.diff":"e3bf5c4793ca8a31ca0e2c7b99dd23513f3326d83ef7107f157218648870f15d","tests/data/gitignores.lines.diff":"3019cd72dde8587c176b65514612cd6cc71d74385f428abf3648e608a7495eb0","tests/data/gitignores.txt":"a076427a81326de1a95733c656bf54382b3a4d79346c73dbfb015b2c37424eef","tests/tests.rs":"975e6311cc897c707b5819af232daa2fad0484d8998414ae81ea28878e5e6027"},"package":"56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"}
|
||||
727
third-party/vendor/diff/Cargo.lock
generated
vendored
Normal file
727
third-party/vendor/diff/Cargo.lock
generated
vendored
Normal file
|
|
@ -0,0 +1,727 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bstr"
|
||||
version = "0.2.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3"
|
||||
|
||||
[[package]]
|
||||
name = "cast"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c24dab4283a142afa2fdca129b80ad2c6284e073930f964c3a1293c225ee39a"
|
||||
dependencies = [
|
||||
"rustc_version",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "2.34.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"textwrap",
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion"
|
||||
version = "0.3.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1604dafd25fba2fe2d5895a9da139f8dc9b319a5fe5354ca137cbbce4e178d10"
|
||||
dependencies = [
|
||||
"atty",
|
||||
"cast",
|
||||
"clap",
|
||||
"criterion-plot",
|
||||
"csv",
|
||||
"itertools",
|
||||
"lazy_static",
|
||||
"num-traits",
|
||||
"oorandom",
|
||||
"plotters",
|
||||
"rayon",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_cbor",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"tinytemplate",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion-plot"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d00996de9f2f7559f7f4dc286073197f83e92256a59ed395f9aac01fe717da57"
|
||||
dependencies = [
|
||||
"cast",
|
||||
"itertools",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-channel"
|
||||
version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crossbeam-epoch",
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.9.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07db9d94cbd326813772c968ccd25999e5f8ae22f4f8d1b11effa37ef6ce281d"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
"memoffset",
|
||||
"once_cell",
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d82ee10ce34d7bc12c2122495e7593a9c41347ecdd64185af4ecf72cb1a7f83"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "csv"
|
||||
version = "1.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"csv-core",
|
||||
"itoa 0.4.8",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "csv-core"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diff"
|
||||
version = "0.1.13"
|
||||
dependencies = [
|
||||
"criterion",
|
||||
"quickcheck",
|
||||
"speculate",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"wasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "half"
|
||||
version = "1.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3"
|
||||
dependencies = [
|
||||
"either",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d"
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.58"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3fac17f7123a73ca62df411b1bf727ccc805daa070338fda671c86dac1bdc27"
|
||||
dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.126"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225"
|
||||
|
||||
[[package]]
|
||||
name = "oorandom"
|
||||
version = "11.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
|
||||
|
||||
[[package]]
|
||||
name = "plotters"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a3fd9ec30b9749ce28cd91f255d569591cdf937fe280c312143e3c4bad6f2a"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
"plotters-backend",
|
||||
"plotters-svg",
|
||||
"wasm-bindgen",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "plotters-backend"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d88417318da0eaf0fdcdb51a0ee6c3bed624333bff8f946733049380be67ac1c"
|
||||
|
||||
[[package]]
|
||||
name = "plotters-svg"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "521fa9638fa597e1dc53e9412a4f9cefb01187ee1f7413076f9e6749e2885ba9"
|
||||
dependencies = [
|
||||
"plotters-backend",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "0.4.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quickcheck"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6"
|
||||
dependencies = [
|
||||
"env_logger",
|
||||
"log",
|
||||
"rand",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "0.6.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.30",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.40",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"crossbeam-deque",
|
||||
"either",
|
||||
"rayon-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon-core"
|
||||
version = "1.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"crossbeam-deque",
|
||||
"crossbeam-utils",
|
||||
"num_cpus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
|
||||
dependencies = [
|
||||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695"
|
||||
|
||||
[[package]]
|
||||
name = "same-file"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.137"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
|
||||
|
||||
[[package]]
|
||||
name = "serde_cbor"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
|
||||
dependencies = [
|
||||
"half",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.137"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.40",
|
||||
"quote 1.0.20",
|
||||
"syn 1.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.81"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c"
|
||||
dependencies = [
|
||||
"itoa 1.0.2",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "speculate"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3cb45d32c801cddf308603926b7c3760db4fa2c66d84c64376b64eec860d005e"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.30",
|
||||
"quote 0.6.13",
|
||||
"syn 0.14.9",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "0.14.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.30",
|
||||
"quote 0.6.13",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.98"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.40",
|
||||
"quote 1.0.20",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
dependencies = [
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tinytemplate"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
version = "2.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
|
||||
dependencies = [
|
||||
"same-file",
|
||||
"winapi",
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.11.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.81"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"wasm-bindgen-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.81"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"proc-macro2 1.0.40",
|
||||
"quote 1.0.20",
|
||||
"syn 1.0.98",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.81"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa"
|
||||
dependencies = [
|
||||
"quote 1.0.20",
|
||||
"wasm-bindgen-macro-support",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.81"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.40",
|
||||
"quote 1.0.20",
|
||||
"syn 1.0.98",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.81"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be"
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.58"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fed94beee57daf8dd7d51f2b15dc2bcde92d7a72304cdf662a4371008b71b90"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
33
third-party/vendor/diff/Cargo.toml
vendored
Normal file
33
third-party/vendor/diff/Cargo.toml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
||||
#
|
||||
# When uploading crates to the registry Cargo will automatically
|
||||
# "normalize" Cargo.toml files for maximal compatibility
|
||||
# with all versions of Cargo and also rewrite `path` dependencies
|
||||
# to registry (e.g., crates.io) dependencies.
|
||||
#
|
||||
# If you are reading this file be aware that the original Cargo.toml
|
||||
# will likely look very different (and much more reasonable).
|
||||
# See Cargo.toml.orig for the original contents.
|
||||
|
||||
[package]
|
||||
name = "diff"
|
||||
version = "0.1.13"
|
||||
authors = ["Utkarsh Kukreti <utkarshkukreti@gmail.com>"]
|
||||
description = "An LCS based slice and string diffing implementation."
|
||||
homepage = "https://github.com/utkarshkukreti/diff.rs"
|
||||
documentation = "https://docs.rs/diff"
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/utkarshkukreti/diff.rs"
|
||||
|
||||
[[bench]]
|
||||
name = "benches"
|
||||
harness = false
|
||||
|
||||
[dev-dependencies.criterion]
|
||||
version = "0.3.5"
|
||||
|
||||
[dev-dependencies.quickcheck]
|
||||
version = "1.0.3"
|
||||
|
||||
[dev-dependencies.speculate]
|
||||
version = "0.1.2"
|
||||
201
third-party/vendor/diff/LICENSE-APACHE
vendored
Normal file
201
third-party/vendor/diff/LICENSE-APACHE
vendored
Normal file
|
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
21
third-party/vendor/diff/LICENSE-MIT
vendored
Normal file
21
third-party/vendor/diff/LICENSE-MIT
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2015 Utkarsh Kukreti
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
46
third-party/vendor/diff/README.md
vendored
Normal file
46
third-party/vendor/diff/README.md
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# diff.rs
|
||||
|
||||
> An LCS based slice and string diffing implementation.
|
||||
|
||||
## Install
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
diff = "0.1"
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```rust
|
||||
extern crate diff;
|
||||
|
||||
fn main() {
|
||||
let left = "foo\nbar\nbaz\nquux";
|
||||
let right = "foo\nbaz\nbar\nquux";
|
||||
|
||||
for diff in diff::lines(left, right) {
|
||||
match diff {
|
||||
diff::Result::Left(l) => println!("-{}", l),
|
||||
diff::Result::Both(l, _) => println!(" {}", l),
|
||||
diff::Result::Right(r) => println!("+{}", r)
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
prints
|
||||
|
||||
```
|
||||
foo
|
||||
-bar
|
||||
baz
|
||||
+bar
|
||||
quux
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
`diff` is primarily distributed under the terms of both the MIT license and the
|
||||
Apache License (Version 2.0).
|
||||
|
||||
See LICENSE-APACHE, and LICENSE-MIT for details.
|
||||
83
third-party/vendor/diff/benches/benches.rs
vendored
Normal file
83
third-party/vendor/diff/benches/benches.rs
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
extern crate criterion;
|
||||
extern crate diff;
|
||||
|
||||
use criterion::Criterion;
|
||||
|
||||
criterion::criterion_group!(benches, bench_slice, bench_chars, bench_real_world);
|
||||
criterion::criterion_main!(benches);
|
||||
|
||||
fn bench_slice(c: &mut Criterion) {
|
||||
c.bench_function("empty", |b| {
|
||||
let slice = [0u8; 0];
|
||||
b.iter(|| ::diff::slice(&slice, &slice));
|
||||
});
|
||||
|
||||
c.bench_function("10 equal items", |b| {
|
||||
let slice = [0u8; 10];
|
||||
b.iter(|| ::diff::slice(&slice, &slice));
|
||||
});
|
||||
|
||||
c.bench_function("10 non-equal items", |b| {
|
||||
let (left, right) = ([0u8; 10], [1u8; 10]);
|
||||
b.iter(|| ::diff::slice(&left, &right));
|
||||
});
|
||||
|
||||
c.bench_function("100 equal items", |b| {
|
||||
let slice = [0u8; 100];
|
||||
b.iter(|| ::diff::slice(&slice, &slice));
|
||||
});
|
||||
|
||||
c.bench_function("100 non-equal items", |b| {
|
||||
let (left, right) = ([0u8; 100], [1u8; 100]);
|
||||
b.iter(|| ::diff::slice(&left, &right));
|
||||
});
|
||||
|
||||
c.bench_function("1000 equal items", |b| {
|
||||
let slice = [0u8; 1000];
|
||||
b.iter(|| ::diff::slice(&slice, &slice));
|
||||
});
|
||||
|
||||
c.bench_function("1000 non-equal items", |b| {
|
||||
let (left, right) = ([0u8; 1000], [1u8; 1000]);
|
||||
b.iter(|| ::diff::slice(&left, &right));
|
||||
});
|
||||
}
|
||||
|
||||
fn bench_chars(c: &mut Criterion) {
|
||||
c.bench_function("1024 byte string, last 256 different", |b| {
|
||||
let left = "?".repeat(768) + &"_".repeat(256);
|
||||
let right = "?".repeat(768) + &"!".repeat(256);
|
||||
assert_eq!(left.len(), right.len());
|
||||
b.iter(|| ::diff::chars(&left, &right));
|
||||
});
|
||||
}
|
||||
|
||||
fn bench_real_world(c: &mut Criterion) {
|
||||
let gitignores = std::fs::read_to_string("tests/data/gitignores.txt")
|
||||
.unwrap()
|
||||
.split("!!!")
|
||||
.filter_map(|str| (!str.is_empty()).then(|| str.into()))
|
||||
.collect::<Vec<String>>();
|
||||
|
||||
c.bench_function("diff::lines on gitignore files from rust-lang/rust", |b| {
|
||||
b.iter(|| {
|
||||
for (i, left) in gitignores.iter().enumerate() {
|
||||
// diff with previous 3, itself, and next 3
|
||||
for right in gitignores[i.saturating_sub(3)..(i + 3).min(gitignores.len())].iter() {
|
||||
::diff::lines(&left, &right);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
c.bench_function("diff::chars on gitignore files from rust-lang/rust", |b| {
|
||||
b.iter(|| {
|
||||
for (i, left) in gitignores.iter().enumerate() {
|
||||
// diff with previous 2, itself, and next 2
|
||||
for right in gitignores[i.saturating_sub(2)..(i + 2).min(gitignores.len())].iter() {
|
||||
::diff::chars(&left, &right);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
14
third-party/vendor/diff/examples/simple.rs
vendored
Normal file
14
third-party/vendor/diff/examples/simple.rs
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
extern crate diff;
|
||||
|
||||
fn main() {
|
||||
let left = "foo\nbar\nbaz\nquux";
|
||||
let right = "foo\nbaz\nbar\nquux";
|
||||
|
||||
for diff in diff::lines(left, right) {
|
||||
match diff {
|
||||
diff::Result::Left(l) => println!("-{}", l),
|
||||
diff::Result::Both(l, _) => println!(" {}", l),
|
||||
diff::Result::Right(r) => println!("+{}", r),
|
||||
}
|
||||
}
|
||||
}
|
||||
167
third-party/vendor/diff/src/lib.rs
vendored
Normal file
167
third-party/vendor/diff/src/lib.rs
vendored
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
/// A fragment of a computed diff.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum Result<T> {
|
||||
/// An element that only exists in the left input.
|
||||
Left(T),
|
||||
/// Elements that exist in both inputs.
|
||||
Both(T, T),
|
||||
/// An element that only exists in the right input.
|
||||
Right(T),
|
||||
}
|
||||
|
||||
/// Computes the diff between two slices.
|
||||
pub fn slice<'a, T: PartialEq>(left: &'a [T], right: &'a [T]) -> Vec<Result<&'a T>> {
|
||||
do_diff(left, right, |t| t)
|
||||
}
|
||||
|
||||
/// Computes the diff between the lines of two strings.
|
||||
pub fn lines<'a>(left: &'a str, right: &'a str) -> Vec<Result<&'a str>> {
|
||||
let mut diff = do_diff(
|
||||
&left.lines().collect::<Vec<_>>(),
|
||||
&right.lines().collect::<Vec<_>>(),
|
||||
|str| *str,
|
||||
);
|
||||
// str::lines() does not yield an empty str at the end if the str ends with
|
||||
// '\n'. We handle this special case by inserting one last diff item,
|
||||
// depending on whether the left string ends with '\n', or the right one,
|
||||
// or both.
|
||||
match (
|
||||
left.as_bytes().last().cloned(),
|
||||
right.as_bytes().last().cloned(),
|
||||
) {
|
||||
(Some(b'\n'), Some(b'\n')) => {
|
||||
diff.push(Result::Both(&left[left.len()..], &right[right.len()..]))
|
||||
}
|
||||
(Some(b'\n'), _) => diff.push(Result::Left(&left[left.len()..])),
|
||||
(_, Some(b'\n')) => diff.push(Result::Right(&right[right.len()..])),
|
||||
_ => {}
|
||||
}
|
||||
diff
|
||||
}
|
||||
|
||||
/// Computes the diff between the chars of two strings.
|
||||
pub fn chars<'a>(left: &'a str, right: &'a str) -> Vec<Result<char>> {
|
||||
do_diff(
|
||||
&left.chars().collect::<Vec<_>>(),
|
||||
&right.chars().collect::<Vec<_>>(),
|
||||
|char| *char,
|
||||
)
|
||||
}
|
||||
|
||||
fn do_diff<'a, T, F, U>(left: &'a [T], right: &'a [T], mapper: F) -> Vec<Result<U>>
|
||||
where
|
||||
T: PartialEq,
|
||||
F: Fn(&'a T) -> U,
|
||||
{
|
||||
let leading_equals = left
|
||||
.iter()
|
||||
.zip(right.iter())
|
||||
.take_while(|(l, r)| l == r)
|
||||
.count();
|
||||
let trailing_equals = left[leading_equals..]
|
||||
.iter()
|
||||
.rev()
|
||||
.zip(right[leading_equals..].iter().rev())
|
||||
.take_while(|(l, r)| l == r)
|
||||
.count();
|
||||
|
||||
let table: Vec2<u32> = {
|
||||
let left_diff_size = left.len() - leading_equals - trailing_equals;
|
||||
let right_diff_size = right.len() - leading_equals - trailing_equals;
|
||||
|
||||
let mut table = Vec2::new(0, [left_diff_size + 1, right_diff_size + 1]);
|
||||
|
||||
let left_skip = &left[leading_equals..left.len() - trailing_equals];
|
||||
let right_skip = &right[leading_equals..right.len() - trailing_equals];
|
||||
|
||||
for (i, l) in left_skip.iter().enumerate() {
|
||||
for (j, r) in right_skip.iter().enumerate() {
|
||||
table.set(
|
||||
[i + 1, j + 1],
|
||||
if l == r {
|
||||
table.get([i, j]) + 1
|
||||
} else {
|
||||
*table.get([i, j + 1]).max(table.get([i + 1, j]))
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
table
|
||||
};
|
||||
|
||||
let mut diff = Vec::with_capacity(left.len().max(right.len()));
|
||||
|
||||
diff.extend(
|
||||
left[..leading_equals]
|
||||
.iter()
|
||||
.zip(&right[..leading_equals])
|
||||
.map(|(l, r)| Result::Both(mapper(l), mapper(r))),
|
||||
);
|
||||
|
||||
{
|
||||
let start = diff.len();
|
||||
let mut i = table.len[0] - 1;
|
||||
let mut j = table.len[1] - 1;
|
||||
let left = &left[leading_equals..];
|
||||
let right = &right[leading_equals..];
|
||||
|
||||
loop {
|
||||
if j > 0 && (i == 0 || table.get([i, j]) == table.get([i, j - 1])) {
|
||||
j -= 1;
|
||||
diff.push(Result::Right(mapper(&right[j])));
|
||||
} else if i > 0 && (j == 0 || table.get([i, j]) == table.get([i - 1, j])) {
|
||||
i -= 1;
|
||||
diff.push(Result::Left(mapper(&left[i])));
|
||||
} else if i > 0 && j > 0 {
|
||||
i -= 1;
|
||||
j -= 1;
|
||||
diff.push(Result::Both(mapper(&left[i]), mapper(&right[j])));
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
diff[start..].reverse();
|
||||
}
|
||||
|
||||
diff.extend(
|
||||
left[left.len() - trailing_equals..]
|
||||
.iter()
|
||||
.zip(&right[right.len() - trailing_equals..])
|
||||
.map(|(l, r)| Result::Both(mapper(l), mapper(r))),
|
||||
);
|
||||
|
||||
diff
|
||||
}
|
||||
|
||||
struct Vec2<T> {
|
||||
len: [usize; 2],
|
||||
data: Vec<T>,
|
||||
}
|
||||
|
||||
impl<T> Vec2<T> {
|
||||
#[inline]
|
||||
fn new(value: T, len: [usize; 2]) -> Self
|
||||
where
|
||||
T: Clone,
|
||||
{
|
||||
Vec2 {
|
||||
len,
|
||||
data: vec![value; len[0] * len[1]],
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get(&self, index: [usize; 2]) -> &T {
|
||||
debug_assert!(index[0] < self.len[0]);
|
||||
debug_assert!(index[1] < self.len[1]);
|
||||
&self.data[index[0] * self.len[1] + index[1]]
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn set(&mut self, index: [usize; 2], value: T) {
|
||||
debug_assert!(index[0] < self.len[0]);
|
||||
debug_assert!(index[1] < self.len[1]);
|
||||
self.data[index[0] * self.len[1] + index[1]] = value;
|
||||
}
|
||||
}
|
||||
34261
third-party/vendor/diff/tests/data/gitignores.chars.diff
vendored
Normal file
34261
third-party/vendor/diff/tests/data/gitignores.chars.diff
vendored
Normal file
File diff suppressed because it is too large
Load diff
35133
third-party/vendor/diff/tests/data/gitignores.lines.diff
vendored
Normal file
35133
third-party/vendor/diff/tests/data/gitignores.lines.diff
vendored
Normal file
File diff suppressed because it is too large
Load diff
8445
third-party/vendor/diff/tests/data/gitignores.txt
vendored
Normal file
8445
third-party/vendor/diff/tests/data/gitignores.txt
vendored
Normal file
File diff suppressed because it is too large
Load diff
304
third-party/vendor/diff/tests/tests.rs
vendored
Normal file
304
third-party/vendor/diff/tests/tests.rs
vendored
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
extern crate diff;
|
||||
extern crate quickcheck;
|
||||
extern crate speculate;
|
||||
|
||||
use diff::Result::*;
|
||||
use speculate::speculate;
|
||||
|
||||
pub fn undiff<T: Clone>(diff: &[::diff::Result<&T>]) -> (Vec<T>, Vec<T>) {
|
||||
let (mut left, mut right) = (vec![], vec![]);
|
||||
for d in diff {
|
||||
match *d {
|
||||
Left(l) => left.push(l.clone()),
|
||||
Both(l, r) => {
|
||||
left.push(l.clone());
|
||||
right.push(r.clone());
|
||||
}
|
||||
Right(r) => right.push(r.clone()),
|
||||
}
|
||||
}
|
||||
(left, right)
|
||||
}
|
||||
|
||||
pub fn undiff_str<'a>(diff: &[::diff::Result<&'a str>]) -> (Vec<&'a str>, Vec<&'a str>) {
|
||||
let (mut left, mut right) = (vec![], vec![]);
|
||||
for d in diff {
|
||||
match *d {
|
||||
Left(l) => left.push(l),
|
||||
Both(l, r) => {
|
||||
left.push(l);
|
||||
right.push(r);
|
||||
}
|
||||
Right(r) => right.push(r),
|
||||
}
|
||||
}
|
||||
(left, right)
|
||||
}
|
||||
|
||||
pub fn undiff_lines<'a>(diff: &[::diff::Result<&'a str>]) -> (String, String) {
|
||||
let (left, right) = undiff_str(diff);
|
||||
(left.join("\n"), right.join("\n"))
|
||||
}
|
||||
|
||||
pub fn undiff_chars(diff: &[::diff::Result<char>]) -> (String, String) {
|
||||
let (mut left, mut right) = (vec![], vec![]);
|
||||
for d in diff {
|
||||
match *d {
|
||||
Left(l) => left.push(l),
|
||||
Both(l, r) => {
|
||||
left.push(l);
|
||||
right.push(r);
|
||||
}
|
||||
Right(r) => right.push(r),
|
||||
}
|
||||
}
|
||||
(
|
||||
left.iter().cloned().collect(),
|
||||
right.iter().cloned().collect(),
|
||||
)
|
||||
}
|
||||
|
||||
speculate! {
|
||||
describe "slice" {
|
||||
fn go<T>(left: &[T], right: &[T], len: usize) where
|
||||
T: Clone + ::std::fmt::Debug + PartialEq
|
||||
{
|
||||
let diff = ::diff::slice(left, right);
|
||||
assert_eq!(diff.len(), len);
|
||||
let (left_, right_) = undiff(&diff);
|
||||
assert_eq!(left, &left_[..]);
|
||||
assert_eq!(right, &right_[..]);
|
||||
}
|
||||
|
||||
test "empty slices" {
|
||||
let slice: &[()] = &[];
|
||||
go(slice, slice, 0);
|
||||
}
|
||||
|
||||
test "equal + non-empty slices" {
|
||||
let slice = [1, 2, 3];
|
||||
go(&slice, &slice, 3);
|
||||
}
|
||||
|
||||
test "left empty, right non-empty" {
|
||||
let slice = [1, 2, 3];
|
||||
go(&slice, &[], 3);
|
||||
}
|
||||
|
||||
test "left non-empty, right empty" {
|
||||
let slice = [1, 2, 3];
|
||||
go(&[], &slice, 3);
|
||||
}
|
||||
|
||||
test "misc 1" {
|
||||
let left = [1, 2, 3, 4, 1, 3];
|
||||
let right = [1, 4, 1, 1];
|
||||
go(&left, &right, 7);
|
||||
}
|
||||
|
||||
test "misc 2" {
|
||||
let left = [1, 2, 1, 2, 3, 2, 2, 3, 1, 3];
|
||||
let right = [3, 3, 1, 2, 3, 1, 2, 3, 4, 1];
|
||||
go(&left, &right, 14);
|
||||
}
|
||||
|
||||
test "misc 3" {
|
||||
let left = [1, 3, 4];
|
||||
let right = [2, 3, 4];
|
||||
go(&left, &right, 4);
|
||||
}
|
||||
|
||||
test "quickcheck" {
|
||||
fn prop(left: Vec<i32>, right: Vec<i32>) -> bool {
|
||||
let diff = ::diff::slice(&left, &right);
|
||||
let (left_, right_) = undiff(&diff);
|
||||
left == left_[..] && right == right_[..]
|
||||
}
|
||||
|
||||
::quickcheck::quickcheck(prop as fn(Vec<i32>, Vec<i32>) -> bool);
|
||||
}
|
||||
}
|
||||
|
||||
describe "lines" {
|
||||
fn go(left: &str, right: &str, len: usize) {
|
||||
let diff = ::diff::lines(left, right);
|
||||
assert_eq!(diff.len(), len);
|
||||
let (left_, right_) = undiff_str(&diff);
|
||||
assert_eq!(left, left_.join("\n"));
|
||||
assert_eq!(right, right_.join("\n"));
|
||||
}
|
||||
|
||||
test "both empty" {
|
||||
go("", "", 0);
|
||||
}
|
||||
|
||||
test "one empty" {
|
||||
go("foo", "", 1);
|
||||
go("", "foo", 1);
|
||||
}
|
||||
|
||||
test "both equal and non-empty" {
|
||||
go("foo\nbar", "foo\nbar", 2);
|
||||
}
|
||||
|
||||
test "misc 1" {
|
||||
go("foo\nbar\nbaz", "foo\nbaz\nquux", 4);
|
||||
}
|
||||
|
||||
test "#10" {
|
||||
go("a\nb\nc", "a\nb\nc\n", 4);
|
||||
go("a\nb\nc\n", "a\nb\nc", 4);
|
||||
let left = "a\nb\n\nc\n\n\n";
|
||||
let right = "a\n\n\nc\n\n";
|
||||
go(left, right, 8);
|
||||
go(right, left, 8);
|
||||
}
|
||||
}
|
||||
|
||||
describe "chars" {
|
||||
fn go(left: &str, right: &str, len: usize) {
|
||||
let diff = ::diff::chars(left, right);
|
||||
assert_eq!(diff.len(), len);
|
||||
let (left_, right_) = undiff_chars(&diff);
|
||||
assert_eq!(left, left_);
|
||||
assert_eq!(right, right_);
|
||||
}
|
||||
|
||||
test "both empty" {
|
||||
go("", "", 0);
|
||||
}
|
||||
|
||||
test "one empty" {
|
||||
go("foo", "", 3);
|
||||
go("", "foo", 3);
|
||||
}
|
||||
|
||||
test "both equal and non-empty" {
|
||||
go("foo bar", "foo bar", 7);
|
||||
}
|
||||
|
||||
test "misc 1" {
|
||||
go("foo bar baz", "foo baz quux", 16);
|
||||
}
|
||||
}
|
||||
|
||||
describe "issues" {
|
||||
test "#4" {
|
||||
assert_eq!(::diff::slice(&[1], &[2]), vec![Left(&1),
|
||||
Right(&2)]);
|
||||
assert_eq!(::diff::lines("a", "b"), vec![Left("a"),
|
||||
Right("b")]);
|
||||
}
|
||||
|
||||
test "#6" {
|
||||
// This produced an overflow in the lines computation because it
|
||||
// was not accounting for the fact that the "right" length was
|
||||
// less than the "left" length.
|
||||
let expected = r#"
|
||||
BacktraceNode {
|
||||
parents: [
|
||||
BacktraceNode {
|
||||
parents: []
|
||||
},
|
||||
BacktraceNode {
|
||||
parents: [
|
||||
BacktraceNode {
|
||||
parents: []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}"#;
|
||||
let actual = r#"
|
||||
BacktraceNode {
|
||||
parents: [
|
||||
BacktraceNode {
|
||||
parents: []
|
||||
},
|
||||
BacktraceNode {
|
||||
parents: [
|
||||
BacktraceNode {
|
||||
parents: []
|
||||
},
|
||||
BacktraceNode {
|
||||
parents: []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}"#;
|
||||
::diff::lines(actual, expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gitignores() {
|
||||
let all = std::fs::read_to_string("tests/data/gitignores.txt")
|
||||
.unwrap()
|
||||
.split("!!!")
|
||||
.map(|str| str.trim())
|
||||
.filter(|str| !str.is_empty())
|
||||
.map(|str| str.replace("\r", ""))
|
||||
.collect::<Vec<String>>();
|
||||
|
||||
go(
|
||||
&all,
|
||||
::diff::lines,
|
||||
undiff_lines,
|
||||
|d| match d {
|
||||
Left(l) => format!("-{}\n", l),
|
||||
Right(r) => format!("+{}\n", r),
|
||||
Both(l, _) => format!(" {}\n", l),
|
||||
},
|
||||
"tests/data/gitignores.lines.diff",
|
||||
);
|
||||
|
||||
go(
|
||||
&all,
|
||||
::diff::chars,
|
||||
undiff_chars,
|
||||
|d| match d {
|
||||
Left(l) => format!("[-{}-]", l),
|
||||
Right(r) => format!("{{+{}+}}", r),
|
||||
Both(l, _) => format!("{}", l),
|
||||
},
|
||||
"tests/data/gitignores.chars.diff",
|
||||
);
|
||||
|
||||
fn go<'a, T, Diff, Undiff, ToString>(
|
||||
all: &'a [String],
|
||||
diff: Diff,
|
||||
undiff: Undiff,
|
||||
to_string: ToString,
|
||||
path: &str,
|
||||
) where
|
||||
Diff: Fn(&'a str, &'a str) -> Vec<::diff::Result<T>>,
|
||||
Undiff: Fn(&[::diff::Result<T>]) -> (String, String),
|
||||
ToString: Fn(&::diff::Result<T>) -> String,
|
||||
T: 'a,
|
||||
{
|
||||
let mut actual = String::new();
|
||||
for i in 0..all.len() {
|
||||
let from = i.saturating_sub(2);
|
||||
let to = (i + 2).min(all.len());
|
||||
for j in from..to {
|
||||
actual.push_str(&format!("i = {}, j = {}\n", i, j));
|
||||
let diff = diff(&all[i], &all[j]);
|
||||
for d in &diff {
|
||||
actual.push_str(&to_string(d));
|
||||
}
|
||||
actual.push_str("\n");
|
||||
let undiff = undiff(&diff);
|
||||
assert_eq!(&undiff.0, &all[i]);
|
||||
assert_eq!(&undiff.1, &all[j]);
|
||||
}
|
||||
}
|
||||
|
||||
if let Ok(expected) = std::fs::read_to_string(path) {
|
||||
assert_eq!(expected.replace("\r", ""), actual);
|
||||
} else {
|
||||
std::fs::write(path, actual).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue