diff --git a/Cargo.lock b/Cargo.lock index ae0cd4c..001443d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,7 +17,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -34,23 +34,11 @@ 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.11.0" +version = "3.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" +checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" [[package]] name = "cast" @@ -58,6 +46,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + [[package]] name = "cfg-if" version = "1.0.0" @@ -66,9 +60,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.22" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "js-sys", @@ -124,9 +118,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "criterion" @@ -166,9 +160,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if", "crossbeam-utils", @@ -176,9 +170,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -187,9 +181,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.11" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg", "cfg-if", @@ -200,22 +194,21 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", ] [[package]] name = "csv" -version = "1.1.6" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +checksum = "0b015497079b9a9d69c02ad25de6c0a6edef051ea6360a327d0bd05802ef64ad" dependencies = [ - "bstr", "csv-core", - "itoa 0.4.8", + "itoa", "ryu", "serde", ] @@ -244,15 +237,15 @@ dependencies = [ [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if", "js-sys", @@ -282,17 +275,36 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + [[package]] name = "iana-time-zone" -version = "0.1.50" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd911b35d940d2bd0bea0f9100068e5b97b51a1cbe13d13382f132e0365257a0" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", + "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows", +] + +[[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]] @@ -306,21 +318,15 @@ dependencies = [ [[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.3" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "68c16e1bfd491478ab155fd8b4896b86f9ede344949b641e61501e07c2b8b4d5" dependencies = [ "wasm-bindgen", ] @@ -333,13 +339,13 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.134" +version = "0.2.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" [[package]] name = "libhaystack" -version = "1.0.10" +version = "1.0.11" dependencies = [ "chrono", "chrono-tz", @@ -381,9 +387,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.6.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] @@ -409,19 +415,19 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] [[package]] name = "once_cell" -version = "1.15.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "oorandom" @@ -431,9 +437,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", @@ -526,18 +532,18 @@ checksum = "07e2192780e9f8e282049ff9bffcaa28171e1cb0844f49ed5374e518ae6024ec" [[package]] name = "proc-macro2" -version = "1.0.46" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" dependencies = [ "proc-macro2", ] @@ -559,21 +565,19 @@ checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" [[package]] name = "rayon" -version = "1.5.3" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.3" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -592,30 +596,24 @@ dependencies = [ [[package]] name = "regex" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" dependencies = [ "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.27" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" +checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "same-file" @@ -634,9 +632,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.145" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" [[package]] name = "serde_cbor" @@ -650,9 +648,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.145" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", @@ -661,11 +659,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.85" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ - "itoa 1.0.3", + "itoa", "ryu", "serde", ] @@ -684,9 +682,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "syn" -version = "1.0.101" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" dependencies = [ "proc-macro2", "quote", @@ -704,9 +702,9 @@ dependencies = [ [[package]] name = "time" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", @@ -725,18 +723,18 @@ dependencies = [ [[package]] name = "uncased" -version = "0.9.7" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b01702b0fd0b3fadcf98e098780badda8742d4f4a7676615cad90e8ac73622" +checksum = "9b9bc53168a4be7402ab86c3aad243a84dd7381d09be0eddc81280c1da95ca68" dependencies = [ "version_check", ] [[package]] name = "unicode-ident" -version = "1.0.4" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-width" @@ -755,11 +753,12 @@ dependencies = [ [[package]] name = "uuid" -version = "1.1.2" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f" +checksum = "4dad5567ad0cf5b760e5665964bec1b47dfd077ba8a2544b513f3556d3d239a2" dependencies = [ "getrandom", + "wasm-bindgen", ] [[package]] @@ -770,12 +769,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -793,9 +791,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "5b6cb788c4e39112fbe1822277ef6fb3c55cd86b95cb3d3c4c1c9597e4ac74b4" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -803,9 +801,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "35e522ed4105a9d626d885b35d62501b30d9666283a5c8be12c14a8bdafe7822" dependencies = [ "bumpalo", "log", @@ -818,9 +816,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "358a79a0cb89d21db8120cbfb91392335913e4890665b1a7981d9e956903b434" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -828,9 +826,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "4783ce29f09b9d93134d41297aded3a712b7b979e9c6f28c32cb88c973a94869" dependencies = [ "proc-macro2", "quote", @@ -841,15 +839,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "a901d592cafaa4d711bc324edfaff879ac700b19c3dfd60058d2b445be2691eb" [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "16b5f940c7edfdc6d12126d98c9ef4d1b3d470011c47c76a6581df47ad9ba721" dependencies = [ "js-sys", "wasm-bindgen", @@ -886,45 +884,134 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" diff --git a/Cargo.toml b/Cargo.toml index 4786c44..399a6cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libhaystack" -version = "1.0.10" +version = "1.0.11" description = "Rust implementation of the Haystack 4 data types, defs, filter, units, and encodings" authors = ["J2 Innovations", "Radu Racariu "] edition = "2021" diff --git a/src/c_api/value.rs b/src/c_api/value.rs index 022eeec..bb5d913 100644 --- a/src/c_api/value.rs +++ b/src/c_api/value.rs @@ -26,7 +26,7 @@ use std::os::raw::c_char; /// ``` #[no_mangle] pub extern "C" fn haystack_value_init() -> Box { - Box::new(Value::default()) + Box::::default() } /// Destructs and free a [Value](crate::val::Value) diff --git a/src/haystack/defs/namespace.rs b/src/haystack/defs/namespace.rs index 3826129..a477787 100644 --- a/src/haystack/defs/namespace.rs +++ b/src/haystack/defs/namespace.rs @@ -695,7 +695,6 @@ impl<'a> Namespace<'a> { pub fn protos(&'a self, parent: &Dict) -> Vec { parent .keys() - .into_iter() .map(|name| self.protos_from_def(parent, name)) .fold(Vec::new(), |mut vec, cur| { vec.extend(cur); diff --git a/src/haystack/encoding/zinc/decode/lexer.rs b/src/haystack/encoding/zinc/decode/lexer.rs index 2243343..91ff353 100644 --- a/src/haystack/encoding/zinc/decode/lexer.rs +++ b/src/haystack/encoding/zinc/decode/lexer.rs @@ -277,7 +277,7 @@ pub(crate) fn parse_number_date_time( let mut read_count = 0; let mut cur = scanner.cur; for _ in 0..4 { - if !(b'0'..=b'9').contains(&cur) || scanner.is_eof { + if !cur.is_ascii_digit() || scanner.is_eof { break; } read_count += 1; diff --git a/src/haystack/encoding/zinc/decode/scalar/date_time.rs b/src/haystack/encoding/zinc/decode/scalar/date_time.rs index ab276cd..4803254 100644 --- a/src/haystack/encoding/zinc/decode/scalar/date_time.rs +++ b/src/haystack/encoding/zinc/decode/scalar/date_time.rs @@ -99,21 +99,27 @@ pub(crate) fn parse_datetime(scanner: &mut Scanner) -> Result { - let fixed = fixed_offset - .ymd(date.year(), date.month(), date.day()) - .and_hms_nano(time.hour(), time.minute(), time.second(), time.nanosecond()); - match make_date_time_with_tz(&fixed, &tz) { - Ok(datetime) => Ok(datetime.into()), - Err(err) => scanner.make_generic_err(&err), - } - } - None => match make_date_time_with_tz(&utc.with_timezone(&Utc.fix()), &tz) { - Ok(datetime) => Ok(datetime.into()), - Err(err) => scanner.make_generic_err(&err), - }, - } + fixed_offset + .map_or_else( + || make_date_time_with_tz(&utc.with_timezone(&Utc.fix()), &tz), + |offset| { + offset + .with_ymd_and_hms( + date.year(), + date.month(), + date.day(), + time.hour(), + time.minute(), + time.second(), + ) + .single() + .and_then(|dt| dt.with_nanosecond(time.nanosecond())) + .ok_or_else(|| String::from("Invalid date time.")) + .and_then(|fixed| make_date_time_with_tz(&fixed, &tz)) + }, + ) + .map(DateTime::from) + .or_else(|err| scanner.make_generic_err(&err)) } } @@ -123,7 +129,7 @@ fn parse_time_zone( if scanner.cur == b'Z' { if scanner.safe_peek() == Some(b' ') && if let Some(char) = scanner.safe_peek() { - (b'A'..=b'Z').contains(&char) + char.is_ascii_uppercase() } else { false } @@ -158,12 +164,12 @@ fn parse_time_zone( let tz_name = parse_time_zone_name(scanner)?; let fixed_offset = if gmt_sign == "+" { - FixedOffset::east(dur.num_seconds() as i32) + FixedOffset::east_opt(dur.num_seconds() as i32) } else { - FixedOffset::west(dur.num_seconds() as i32) + FixedOffset::west_opt(dur.num_seconds() as i32) }; - Ok((tz_name, Some(fixed_offset))) + Ok((tz_name, fixed_offset)) } } diff --git a/src/haystack/encoding/zinc/decode/scalar/number.rs b/src/haystack/encoding/zinc/decode/scalar/number.rs index 4483552..36f391f 100644 --- a/src/haystack/encoding/zinc/decode/scalar/number.rs +++ b/src/haystack/encoding/zinc/decode/scalar/number.rs @@ -18,7 +18,7 @@ pub(crate) fn parse_number(scanner: &mut Scanner) -> Result Scanner<'a, R> { /// True if cur is a digit char pub fn is_digit(&self) -> bool { - (b'0'..=b'9').contains(&self.cur) + self.cur.is_ascii_digit() } /// True if cur is a hex digit char pub fn is_hex_digit(&self) -> bool { - self.is_digit() || (b'a'..=b'f').contains(&self.cur) || (b'A'..=b'F').contains(&self.cur) + self.cur.is_ascii_hexdigit() } /// True if cur is an upper case char pub fn is_upper(&self) -> bool { - (b'A'..=b'Z').contains(&self.cur) + self.cur.is_ascii_uppercase() } /// True if cur is an lower case char pub fn is_lower(&self) -> bool { - (b'a'..=b'z').contains(&self.cur) + self.cur.is_ascii_lowercase() } /// True if cur is an alpha char diff --git a/src/haystack/val/boolean.rs b/src/haystack/val/boolean.rs index b0f13fe..833446e 100644 --- a/src/haystack/val/boolean.rs +++ b/src/haystack/val/boolean.rs @@ -28,7 +28,7 @@ use crate::haystack::val::Value; /// assert!(!Bool::try_from(&false_val).unwrap().value) ///``` /// -#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Copy, Clone, Debug)] +#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Copy, Clone, Debug, Default)] pub struct Bool { pub value: bool, } diff --git a/src/haystack/val/coord.rs b/src/haystack/val/coord.rs index 14f63ba..c311fac 100644 --- a/src/haystack/val/coord.rs +++ b/src/haystack/val/coord.rs @@ -25,7 +25,7 @@ use std::{ /// assert_eq!(Coord::try_from(&coord).unwrap().lat, 45.0); ///``` /// -#[derive(Copy, Clone, Debug)] +#[derive(Copy, Clone, Debug, Default)] pub struct Coord { pub lat: f64, pub long: f64, diff --git a/src/haystack/val/datetime.rs b/src/haystack/val/datetime.rs index 784e511..91a5792 100644 --- a/src/haystack/val/datetime.rs +++ b/src/haystack/val/datetime.rs @@ -120,7 +120,7 @@ impl From for Value { } /// Converts from `DateTimeImpl` to a `DateTime` `Value` -#[cfg(feature = "timezone")] +#[cfg(feature = "timezone-db")] impl From> for Value { fn from(from: DateTimeImpl) -> Self { Value::DateTime(DateTime::from(from)) @@ -128,7 +128,7 @@ impl From> for Value { } /// Converts from `DateTimeImpl` to a `DateTime` `Value` -#[cfg(not(feature = "timezone"))] +#[cfg(not(feature = "timezone-db"))] impl From> for Value { fn from(from: DateTimeImpl) -> Self { Value::DateTime(DateTime { value: from.into() }) @@ -136,7 +136,7 @@ impl From> for Value { } /// Converts from `DateTimeImpl` to a `DateTime` -#[cfg(not(feature = "timezone"))] +#[cfg(not(feature = "timezone-db"))] impl From> for DateTime { fn from(from: DateTimeImpl) -> Self { DateTime { value: from.into() } @@ -144,7 +144,7 @@ impl From> for DateTime { } /// Converts from `DateTimeImpl` to a `DateTime` -#[cfg(not(feature = "timezone"))] +#[cfg(not(feature = "timezone-db"))] impl From> for DateTime { fn from(from: DateTimeImpl) -> Self { DateTime { value: from } @@ -152,7 +152,7 @@ impl From> for DateTime { } /// Converts from `DateTimeImpl` to a `DateTime` -#[cfg(feature = "timezone")] +#[cfg(feature = "timezone-db")] impl From> for DateTime { fn from(from: DateTimeImpl) -> Self { DateTime { @@ -162,7 +162,7 @@ impl From> for DateTime { } /// Converts from `DateTimeImpl` to a `DateTime` -#[cfg(feature = "timezone")] +#[cfg(feature = "timezone-db")] impl From> for DateTime { fn from(value: DateTimeImpl) -> Self { DateTime { value } diff --git a/src/haystack/val/dict.rs b/src/haystack/val/dict.rs index 63a0468..a0eb85d 100644 --- a/src/haystack/val/dict.rs +++ b/src/haystack/val/dict.rs @@ -38,7 +38,7 @@ pub type DictType = BTreeMap; /// // Get a `Str` value from the dictionary /// assert_eq!(dict_value.get_str("name"), Some(&"Foo".into())); ///``` -#[derive(Eq, PartialEq, Hash, Clone, Debug)] +#[derive(Eq, PartialEq, Hash, Clone, Debug, Default)] pub struct Dict { value: DictType, } @@ -124,15 +124,6 @@ impl Dict { } } -/// Implements the `Default` trait for `Dict` -impl Default for Dict { - fn default() -> Self { - Dict { - value: DictType::default(), - } - } -} - /// Implement FromIterator for `Dict` /// /// Allows constructing a `Dict` from a `(String, Value)` tuple iterator diff --git a/src/haystack/val/grid.rs b/src/haystack/val/grid.rs index 67caf73..4e4c9d8 100644 --- a/src/haystack/val/grid.rs +++ b/src/haystack/val/grid.rs @@ -10,7 +10,7 @@ use std::iter::Iterator; use std::ops::Index; /// Grid Column -#[derive(Eq, PartialEq, PartialOrd, Ord, Hash, Clone, Debug)] +#[derive(Eq, PartialEq, PartialOrd, Ord, Hash, Clone, Debug, Default)] pub struct Column { /// Column name pub name: String, diff --git a/src/haystack/val/kind.rs b/src/haystack/val/kind.rs index efa52d4..449a11d 100644 --- a/src/haystack/val/kind.rs +++ b/src/haystack/val/kind.rs @@ -7,9 +7,10 @@ use std::fmt::Display; use super::Value; /// List all haystack kind types as an simple enum -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub enum HaystackKind { /// No value + #[default] Null, /// A remove tag Remove, @@ -47,13 +48,6 @@ pub enum HaystackKind { Grid, } -/// Default Kind variant -impl Default for HaystackKind { - fn default() -> Self { - HaystackKind::Null - } -} - impl TryFrom for HaystackKind { type Error = String; diff --git a/src/haystack/val/number.rs b/src/haystack/val/number.rs index 7b6403e..3b15762 100644 --- a/src/haystack/val/number.rs +++ b/src/haystack/val/number.rs @@ -33,7 +33,7 @@ use std::{ /// let num_unit_value = Value::from(Number::make_with_unit(100.0, "sec".into())); /// assert_eq!(Number::try_from(&num_unit_value).unwrap().unit, get_unit("sec")); ///``` -#[derive(Copy, Clone, Debug)] +#[derive(Copy, Clone, Debug, Default)] pub struct Number { pub value: f64, pub unit: Option<&'static Unit>, diff --git a/src/haystack/val/string.rs b/src/haystack/val/string.rs index 0fba775..8cf20c2 100644 --- a/src/haystack/val/string.rs +++ b/src/haystack/val/string.rs @@ -24,7 +24,7 @@ use crate::haystack::val::Value; /// let str:Str = "sample string".into(); /// assert_eq!(str.as_str(), "sample string"); /// ``` -#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug)] +#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Default)] pub struct Str { pub value: String, } diff --git a/src/haystack/val/symbol.rs b/src/haystack/val/symbol.rs index f3279fa..6d5680a 100644 --- a/src/haystack/val/symbol.rs +++ b/src/haystack/val/symbol.rs @@ -18,7 +18,7 @@ use crate::haystack::val::Value; /// // Get the symbol value from the Value /// assert_eq!(Symbol::try_from(&sym_value).unwrap(), Symbol::from("symbol")); /// ``` -#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug)] +#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Default)] pub struct Symbol { pub value: String, } diff --git a/src/haystack/val/time.rs b/src/haystack/val/time.rs index 2913c62..cea2499 100644 --- a/src/haystack/val/time.rs +++ b/src/haystack/val/time.rs @@ -25,7 +25,7 @@ use std::str::FromStr; /// // Get the Time value /// assert_eq!(Time::try_from(&time).unwrap().hour(), 16); ///``` -#[derive(Eq, PartialEq, Copy, Clone, Debug)] +#[derive(Eq, PartialEq, Copy, Clone, Debug, Default)] pub struct Time { value: NaiveTime, } diff --git a/src/haystack/val/uri.rs b/src/haystack/val/uri.rs index 12e8634..6cb3cd6 100644 --- a/src/haystack/val/uri.rs +++ b/src/haystack/val/uri.rs @@ -18,7 +18,7 @@ use crate::haystack::val::Value; /// // Get the uri value from the Value /// assert_eq!(Uri::try_from(&uri_value).unwrap(), Uri::from("/an/uri")); /// ``` -#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug)] +#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Default)] pub struct Uri { pub value: String, } diff --git a/src/haystack/val/xstr.rs b/src/haystack/val/xstr.rs index afe58f3..a433130 100644 --- a/src/haystack/val/xstr.rs +++ b/src/haystack/val/xstr.rs @@ -18,7 +18,7 @@ use crate::haystack::val::Value; /// // Get the XStr value from the Value /// assert_eq!(XStr::try_from(&xstr_value).unwrap(), XStr::make("Type", r#"{"test":"100"}"#)); /// ``` -#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug)] +#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Default)] pub struct XStr { pub r#type: String, pub value: String,