diff --git a/Cargo.lock b/Cargo.lock index 43770eae..ab170a96 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,7 +65,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -105,7 +105,7 @@ dependencies = [ "actix-utils", "futures-core", "futures-util", - "mio 1.0.2", + "mio", "socket2", "tokio", "tracing", @@ -183,14 +183,14 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] name = "addr2line" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -246,9 +246,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -261,43 +261,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "arc-swap" @@ -324,7 +324,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -335,7 +335,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -372,7 +372,7 @@ dependencies = [ "futures-util", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "itoa", "matchit", "memchr", @@ -389,9 +389,9 @@ dependencies = [ [[package]] name = "axum" -version = "0.7.7" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core 0.4.5", @@ -408,7 +408,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "tower 0.5.1", "tower-layer", "tower-service", @@ -446,7 +446,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", ] @@ -463,7 +463,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -480,9 +480,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bindgen" -version = "0.69.4" +version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ "bitflags 2.6.0", "cexpr", @@ -495,7 +495,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -554,15 +554,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "bytestring" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" +checksum = "e465647ae23b2823b0753f50decb2d5a86d2bb2cac04788fafd1f80e45378e5f" dependencies = [ "bytes", ] @@ -586,9 +586,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.24" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "jobserver", "libc", @@ -659,18 +659,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.19" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.19" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -680,9 +680,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "cobs" @@ -692,9 +692,9 @@ checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "combine" @@ -765,9 +765,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -821,9 +821,9 @@ dependencies = [ [[package]] name = "critical-section" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64009896348fc5af4222e9cf7d7d82a95a256c634ebcf61c53e4ea461422242" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" [[package]] name = "crossbeam-channel" @@ -877,11 +877,12 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.5.3" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ "cfg-if", + "crossbeam-utils", "hashbrown 0.14.5", "lock_api", "once_cell", @@ -907,7 +908,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -920,6 +921,17 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "either" version = "1.13.0" @@ -940,9 +952,9 @@ checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -965,9 +977,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "filetime" @@ -989,9 +1001,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -1038,9 +1050,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1053,9 +1065,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1063,15 +1075,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1080,38 +1092,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1142,17 +1154,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi", - "wasm-bindgen", ] [[package]] name = "gimli" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -1181,9 +1191,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -1234,9 +1244,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heapless" @@ -1346,9 +1356,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -1370,14 +1380,14 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.6", + "h2 0.4.7", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -1395,7 +1405,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 0.14.30", + "hyper 0.14.31", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -1403,11 +1413,11 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.4.1", + "hyper 1.5.1", "hyper-util", "pin-project-lite", "tokio", @@ -1422,7 +1432,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.1", "hyper-util", "native-tls", "tokio", @@ -1432,16 +1442,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.1", "pin-project-lite", "socket2", "tokio", @@ -1449,21 +1459,150 @@ dependencies = [ "tracing", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "impl-more" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" +checksum = "aae21c3177a27788957044151cc2800043d127acaa460a47ebb9b84dfa2c6aa0" [[package]] name = "indexmap" @@ -1482,14 +1621,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.2", ] [[package]] name = "inotify" -version = "0.9.6" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +checksum = "fdd168d97690d0b8c412d6b6c10360277f4d7ee495c5d0d5d5fe0854923255cc" dependencies = [ "bitflags 1.3.2", "inotify-sys", @@ -1505,11 +1644,20 @@ dependencies = [ "libc", ] +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + [[package]] name = "ipnet" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" @@ -1557,9 +1705,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" [[package]] name = "jobserver" @@ -1572,9 +1720,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1619,9 +1767,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "libloading" @@ -1630,7 +1778,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -1680,27 +1828,22 @@ dependencies = [ "cfg-if", "criterion", "dashmap", - "futures", - "getrandom", - "h2 0.3.26", - "metrics", + "h2 0.4.7", + "metrics 0.24.0", "moka", "paste", "postcard", "prost 0.13.3", - "prost-types 0.13.3", + "prost-types", "r2d2", "rand", "redis", "redis-test", - "rmp-serde", "rocksdb", "serde", "serde_json", "serial_test", "tempfile", - "thiserror", - "time", "tokio", "tokio-stream", "tonic 0.12.3", @@ -1721,7 +1864,7 @@ dependencies = [ "lazy_static", "limitador", "log", - "metrics", + "metrics 0.22.3", "metrics-exporter-prometheus", "notify", "openssl", @@ -1731,11 +1874,11 @@ dependencies = [ "opentelemetry_sdk", "paperclip", "prost 0.13.3", - "prost-types 0.13.3", + "prost-types", "serde", "serde_yaml", "sysinfo", - "thiserror", + "thiserror 2.0.3", "tokio", "tonic 0.12.3", "tonic-build", @@ -1753,6 +1896,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "local-channel" version = "0.1.5" @@ -1827,6 +1976,16 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "metrics" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae428771d17306715c5091d446327d1cfdedc82185c65ba8423ab404e45bf10" +dependencies = [ + "ahash", + "portable-atomic", +] + [[package]] name = "metrics-exporter-prometheus" version = "0.14.0" @@ -1835,15 +1994,15 @@ checksum = "5d58e362dc7206e9456ddbcdbd53c71ba441020e62104703075a69151e38d85f" dependencies = [ "base64 0.22.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.1", "hyper-tls", "hyper-util", "indexmap 2.6.0", "ipnet", - "metrics", + "metrics 0.22.3", "metrics-util", "quanta", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -1857,7 +2016,7 @@ dependencies = [ "crossbeam-epoch", "crossbeam-utils", "hashbrown 0.14.5", - "metrics", + "metrics 0.22.3", "num_cpus", "quanta", "sketches-ddsketch", @@ -1894,18 +2053,6 @@ dependencies = [ "adler2", ] -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "log", - "wasi", - "windows-sys 0.48.0", -] - [[package]] name = "mio" version = "1.0.2" @@ -1934,7 +2081,7 @@ dependencies = [ "rustc_version", "smallvec", "tagptr", - "thiserror", + "thiserror 1.0.69", "triomphe", "uuid", ] @@ -1974,21 +2121,30 @@ dependencies = [ [[package]] name = "notify" -version = "6.1.1" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" +checksum = "c533b4c39709f9ba5005d8002048266593c1cfaf3c5f0739d5b8ab0c6c504009" dependencies = [ "bitflags 2.6.0", - "crossbeam-channel", "filetime", "fsevent-sys", "inotify", "kqueue", "libc", "log", - "mio 0.8.11", + "mio", + "notify-types", "walkdir", - "windows-sys 0.48.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "notify-types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7393c226621f817964ffb3dc5704f9509e107a8b024b489cc2c1b217378785df" +dependencies = [ + "instant", ] [[package]] @@ -2056,21 +2212,18 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.1" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" -dependencies = [ - "portable-atomic", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -2080,9 +2233,9 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -2101,7 +2254,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -2112,18 +2265,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.3.2+3.3.2" +version = "300.4.1+3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -2143,7 +2296,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.69", "urlencoding", ] @@ -2161,7 +2314,7 @@ dependencies = [ "opentelemetry-semantic-conventions", "opentelemetry_sdk", "prost 0.12.6", - "thiserror", + "thiserror 1.0.69", "tokio", "tonic 0.11.0", ] @@ -2216,16 +2369,16 @@ dependencies = [ "ordered-float", "percent-encoding", "rand", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] [[package]] name = "ordered-float" -version = "4.3.0" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d501f1a72f71d3c063a6bbc8f7271fa73aa09fe5d6283b6571e2ed176a2537" +checksum = "c65ee1f9701bf938026630b455d5315f490640234259037edb259798b3bcf85e" dependencies = [ "num-traits", ] @@ -2238,9 +2391,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "paperclip" -version = "0.8.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2509afd8f138efe07cd367832289f5cc61d1eb1ec7f1eb75172abca6f7b9b66d" +checksum = "0a5f716236005663601c6a37562df63c1ff26d8d5ed24297b60fb8c64ffae237" dependencies = [ "anyhow", "itertools 0.10.5", @@ -2253,15 +2406,15 @@ dependencies = [ "serde_derive", "serde_json", "serde_yaml", - "thiserror", + "thiserror 1.0.69", "url", ] [[package]] name = "paperclip-actix" -version = "0.6.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4adf797da91baee514bc03b020fdd6673d2f8c1af8a859e50d6d803a4b3dddd2" +checksum = "d657a5d373b74ab8c2331593c36784fb9b3b0a83484d7b4a898adbed303bbaf2" dependencies = [ "actix-service", "actix-web", @@ -2275,9 +2428,9 @@ dependencies = [ [[package]] name = "paperclip-core" -version = "0.6.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8db363c823fa71c00da73ff8cee3d6902e1ad66b770cc224a74dc7cf54de3aad" +checksum = "1a6842cfd9f8603f9d8ece3feb8b6995306b87f3e38d9251b86f503b61390183" dependencies = [ "actix-web", "mime", @@ -2288,20 +2441,20 @@ dependencies = [ "serde", "serde_json", "serde_yaml", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "paperclip-macros" -version = "0.6.5" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0385be5ae9c886c46688290534363a229f2531aa2c5c2bfc3b3ddafed5143aaa" +checksum = "827a0067440b62e798bc3e8cfb7036a0f63c3adbb21fe6a56fb3d6f6d8fa53f8" dependencies = [ "heck 0.4.1", "http 0.2.12", "lazy_static", "mime", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", "strum", @@ -2329,7 +2482,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2356,29 +2509,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2422,9 +2575,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "postcard" @@ -2456,43 +2609,41 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.22" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ - "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", - "version_check", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-error2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" dependencies = [ + "proc-macro-error-attr2", "proc-macro2", "quote", - "version_check", + "syn 2.0.89", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2519,22 +2670,22 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.12.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" dependencies = [ "bytes", "heck 0.5.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "multimap", "once_cell", "petgraph", "prettyplease", - "prost 0.12.6", - "prost-types 0.12.6", + "prost 0.13.3", + "prost-types", "regex", - "syn 2.0.79", + "syn 2.0.89", "tempfile", ] @@ -2548,7 +2699,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -2561,16 +2712,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.79", -] - -[[package]] -name = "prost-types" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" -dependencies = [ - "prost 0.12.6", + "syn 2.0.89", ] [[package]] @@ -2649,9 +2791,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.1.0" +version = "11.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" dependencies = [ "bitflags 2.6.0", ] @@ -2678,9 +2820,9 @@ dependencies = [ [[package]] name = "redis" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92f61607c4c4442b575fbc3f31a5dd4e5dd69cfea8f6afec5b83e24f61c126ab" +checksum = "81cccf17a692ce51b86564334614d72dcae1def0fd5ecebc9f02956da74352b5" dependencies = [ "arc-swap", "async-trait", @@ -2724,13 +2866,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -2745,9 +2887,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2772,28 +2914,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -[[package]] -name = "rmp" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" -dependencies = [ - "byteorder", - "num-traits", - "paste", -] - -[[package]] -name = "rmp-serde" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" -dependencies = [ - "byteorder", - "rmp", - "serde", -] - [[package]] name = "rocksdb" version = "0.22.0" @@ -2827,9 +2947,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -2840,9 +2960,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -2861,18 +2981,18 @@ dependencies = [ [[package]] name = "scc" -version = "2.2.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836f1e0f4963ef5288b539b643b35e043e76a32d0f4e47e67febf69576527f50" +checksum = "66b202022bb57c049555430e11fc22fea12909276a80a4c3d368da36ac1d88ed" dependencies = [ "sdd", ] [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -2894,9 +3014,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sdd" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a7b59a5d9b0099720b417b6325d91a52cbf5b3dcb5041d864be53eefa58abc" +checksum = "49c1eeaf4b6a87c7479688c6d52b9f1153cedd3c489300564f932b065c6eab95" [[package]] name = "security-framework" @@ -2913,9 +3033,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -2929,29 +3049,29 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -2986,9 +3106,9 @@ dependencies = [ [[package]] name = "serial_test" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" +checksum = "1b258109f244e1d6891bf1053a55d63a5cd4f8f4c30cf9a1280989f80e7a1fa9" dependencies = [ "futures", "log", @@ -3000,13 +3120,13 @@ dependencies = [ [[package]] name = "serial_test_derive" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" +checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -3134,9 +3254,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", @@ -3151,21 +3271,31 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + +[[package]] +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] [[package]] name = "sysinfo" -version = "0.30.13" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" +checksum = "e3b5ae3f4f7d64646c46c4cae4e3f01d1c5d255c7406fdd7c7f999a94e488791" dependencies = [ - "cfg-if", "core-foundation-sys", "libc", + "memchr", "ntapi", - "once_cell", "rayon", "windows", ] @@ -3178,9 +3308,9 @@ checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -3191,22 +3321,42 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -3251,40 +3401,35 @@ dependencies = [ ] [[package]] -name = "tinytemplate" -version = "1.2.1" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "serde", - "serde_json", + "displaydoc", + "zerovec", ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "tinytemplate" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ - "tinyvec_macros", + "serde", + "serde_json", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", "libc", - "mio 1.0.2", + "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", @@ -3311,7 +3456,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -3373,7 +3518,7 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-timeout 0.4.1", "percent-encoding", "pin-project", @@ -3394,15 +3539,15 @@ checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", - "axum 0.7.7", + "axum 0.7.9", "base64 0.22.1", "bytes", - "h2 0.4.6", + "h2 0.4.7", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", - "hyper-timeout 0.5.1", + "hyper 1.5.1", + "hyper-timeout 0.5.2", "hyper-util", "percent-encoding", "pin-project", @@ -3418,15 +3563,16 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ "prettyplease", "proc-macro2", "prost-build", + "prost-types", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -3436,7 +3582,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "878d81f52e7fcfd80026b7fdb6a9b578b3c3653ba987f87f0dce4b64043cba27" dependencies = [ "prost 0.13.3", - "prost-types 0.13.3", + "prost-types", "tokio", "tokio-stream", "tonic 0.12.3", @@ -3508,7 +3654,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", ] [[package]] @@ -3588,33 +3734,15 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-xid" @@ -3630,9 +3758,9 @@ checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -3645,6 +3773,18 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -3653,9 +3793,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "rand", @@ -3706,9 +3846,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -3717,24 +3857,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3742,28 +3882,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -3812,63 +3952,73 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.52.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" dependencies = [ "windows-core", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] name = "windows-core" -version = "0.52.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" dependencies = [ - "windows-targets 0.52.6", + "windows-implement", + "windows-interface", + "windows-result", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-implement" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ - "windows-targets 0.48.5", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "windows-sys" -version = "0.52.0" +name = "windows-interface" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ - "windows-targets 0.52.6", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets", ] [[package]] name = "windows-sys" -version = "0.59.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -3877,46 +4027,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -3931,51 +4063,63 @@ checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] -name = "windows_i686_msvc" +name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" +name = "windows_x86_64_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] -name = "windows_x86_64_gnu" +name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" +name = "write16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" [[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" +name = "writeable" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" +name = "yoke" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] [[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" +name = "yoke-derive" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure", +] [[package]] name = "zerocopy" @@ -3995,7 +4139,50 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.89", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] diff --git a/limitador-server/Cargo.toml b/limitador-server/Cargo.toml index adfc3f1b..6ed286c9 100644 --- a/limitador-server/Cargo.toml +++ b/limitador-server/Cargo.toml @@ -20,7 +20,7 @@ distributed_storage = ["limitador/distributed_storage"] [dependencies] limitador = { path = "../limitador", features = ['lenient_conditions'] } tokio = { version = "1", features = ["full"] } -thiserror = "1" +thiserror = "2" tonic = "0.12.3" tonic-reflection = "0.12.3" prost = "0.13.3" @@ -38,17 +38,17 @@ opentelemetry-otlp = "0.15" url = "2" actix-web = "4.1" actix-rt = "2" -paperclip = { version = "0.8.0", features = ["actix4"] } +paperclip = { version = "0.9", features = ["actix4"] } serde = { version = "1", features = ["derive"] } -notify = "6.0.1" +notify = "7" const_format = "0.2.31" lazy_static = "1.4.0" clap = "4.3" -sysinfo = "0.30.10" +sysinfo = "0.32" openssl = { version = "0.10.66", features = ["vendored"] } metrics = "0.22.3" metrics-exporter-prometheus = "0.14.0" [build-dependencies] -tonic-build = "0.11" +tonic-build = "0.12" diff --git a/limitador-server/build.rs b/limitador-server/build.rs index 9700c93b..d3b52467 100644 --- a/limitador-server/build.rs +++ b/limitador-server/build.rs @@ -15,7 +15,7 @@ fn generate_protobuf() -> Result<(), Box> { tonic_build::configure() .build_server(true) .file_descriptor_set_path(original_out_dir.join("rls.bin")) - .compile( + .compile_protos( &["envoy/service/ratelimit/v3/rls.proto"], &[ "vendor/protobufs/data-plane-api", diff --git a/limitador-server/src/envoy_rls/server.rs b/limitador-server/src/envoy_rls/server.rs index 51d7e9d3..4eef9151 100644 --- a/limitador-server/src/envoy_rls/server.rs +++ b/limitador-server/src/envoy_rls/server.rs @@ -255,7 +255,8 @@ mod tests { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); let limiter = RateLimiter::new(10_000); limiter.add_limit(limit); @@ -394,8 +395,10 @@ mod tests { let namespace = "test_namespace"; vec![ - Limit::new(namespace, 10, 60, vec!["x == '1'"], vec!["z"]), - Limit::new(namespace, 0, 60, vec!["x == '1'", "y == '2'"], vec!["z"]), + Limit::new(namespace, 10, 60, vec!["x == '1'"], vec!["z"]) + .expect("This must be a valid limit!"), + Limit::new(namespace, 0, 60, vec!["x == '1'", "y == '2'"], vec!["z"]) + .expect("This must be a valid limit!"), ] .into_iter() .for_each(|limit| { @@ -459,7 +462,8 @@ mod tests { #[tokio::test] async fn test_takes_into_account_the_hits_addend_param() { let namespace = "test_namespace"; - let limit = Limit::new(namespace, 10, 60, vec!["x == '1'"], vec!["y"]); + let limit = Limit::new(namespace, 10, 60, vec!["x == '1'"], vec!["y"]) + .expect("This must be a valid limit!"); let limiter = RateLimiter::new(10_000); limiter.add_limit(limit); @@ -528,7 +532,8 @@ mod tests { // "hits_addend" is optional according to the spec, and should default // to 1, However, with the autogenerated structs it defaults to 0. let namespace = "test_namespace"; - let limit = Limit::new(namespace, 1, 60, vec!["x == '1'"], vec!["y"]); + let limit = Limit::new(namespace, 1, 60, vec!["x == '1'"], vec!["y"]) + .expect("This must be a valid limit!"); let limiter = RateLimiter::new(10_000); limiter.add_limit(limit); diff --git a/limitador-server/src/http_api/request_types.rs b/limitador-server/src/http_api/request_types.rs index 6f2fb900..1cae899a 100644 --- a/limitador-server/src/http_api/request_types.rs +++ b/limitador-server/src/http_api/request_types.rs @@ -1,9 +1,9 @@ use limitador::counter::Counter as LimitadorCounter; +use limitador::errors::LimitadorError; use limitador::limit::Limit as LimitadorLimit; use paperclip::actix::Apiv2Schema; use serde::{Deserialize, Serialize}; use std::collections::{BTreeMap, HashMap}; - // We need to define the Limit and Counter types. They're basically the same as // defined in the lib but with some modifications to be able to derive // Apiv2Schema (needed to generate the OpenAPI specs). @@ -41,8 +41,10 @@ impl From<&LimitadorLimit> for Limit { } } -impl From for LimitadorLimit { - fn from(limit: Limit) -> Self { +impl TryFrom for LimitadorLimit { + type Error = LimitadorError; + + fn try_from(limit: Limit) -> Result { let mut limitador_limit = if let Some(id) = limit.id { Self::with_id( id, @@ -51,7 +53,7 @@ impl From for LimitadorLimit { limit.seconds, limit.conditions, limit.variables, - ) + )? } else { Self::new( limit.namespace, @@ -59,14 +61,14 @@ impl From for LimitadorLimit { limit.seconds, limit.conditions, limit.variables, - ) + )? }; if let Some(name) = limit.name { limitador_limit.set_name(name) } - limitador_limit + Ok(limitador_limit) } } diff --git a/limitador-server/src/http_api/server.rs b/limitador-server/src/http_api/server.rs index bc3b91e6..25a1cd76 100644 --- a/limitador-server/src/http_api/server.rs +++ b/limitador-server/src/http_api/server.rs @@ -555,7 +555,8 @@ mod tests { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); match &limiter { Limiter::Blocking(limiter) => limiter.add_limit(limit.clone()), diff --git a/limitador/Cargo.toml b/limitador/Cargo.toml index 97ed5ff1..d9240b5f 100644 --- a/limitador/Cargo.toml +++ b/limitador/Cargo.toml @@ -21,18 +21,14 @@ lenient_conditions = [] [dependencies] moka = { version = "0.12", features = ["sync"] } -dashmap = "5.5.3" -getrandom = { version = "0.2", features = ["js"] } +dashmap = "6.1" serde = { version = "1", features = ["derive", "rc"] } postcard = { version = "1.0.4", features = ["use-std"] } serde_json = "1" -rmp-serde = "1.1.0" -thiserror = "1" -futures = "0.3" async-trait = "0.1" cfg-if = "1" tracing = "0.1.40" -metrics = "0.22.3" +metrics = "0.24" # Optional dependencies rocksdb = { version = "0.22", optional = true, features = ["multi-threaded-cf"] } @@ -52,13 +48,12 @@ tokio = { version = "1", optional = true, features = [ base64 = { version = "0.22", optional = true } tokio-stream = { version = "0.1", optional = true } -h2 = { version = "0.3", optional = true } +h2 = { version = "0.4", optional = true } uuid = { version = "1.8.0", features = ["v4", "fast-rng"], optional = true } tonic = { version = "0.12.3", optional = true } tonic-reflection = { version = "0.12.3", optional = true } prost = { version = "0.13.3", optional = true } prost-types = { version = "0.13.3", optional = true } -time = "0.3.36" [dev-dependencies] serial_test = "3.0" @@ -80,7 +75,7 @@ tokio = { version = "1", features = [ ] } [build-dependencies] -tonic-build = "0.11" +tonic-build = "0.12" [[bench]] name = "bench" diff --git a/limitador/benches/bench.rs b/limitador/benches/bench.rs index 601fa923..5dcb3677 100644 --- a/limitador/benches/bench.rs +++ b/limitador/benches/bench.rs @@ -547,13 +547,16 @@ fn generate_test_limits(scenario: &TestScenario) -> (Vec, Vec Result<(), Box> { tonic_build::configure() .protoc_arg("--experimental_allow_proto3_optional") - .compile(&[proto_path], &[proto_dir])?; + .compile_protos(&[proto_path], &[proto_dir])?; } Ok(()) diff --git a/limitador/src/errors.rs b/limitador/src/errors.rs index 48df32ea..d590aafa 100644 --- a/limitador/src/errors.rs +++ b/limitador/src/errors.rs @@ -1,14 +1,51 @@ +use crate::limit::ConditionParsingError; use crate::storage::StorageErr; -use thiserror::Error; +use std::convert::Infallible; +use std::error::Error; +use std::fmt::{Display, Formatter}; -#[derive(Error, Debug, Eq, PartialEq)] +#[derive(Debug)] pub enum LimitadorError { - #[error("error while accessing the limits storage: {0:?}")] - Storage(String), + StorageError(StorageErr), + InterpreterError(ConditionParsingError), +} + +impl Display for LimitadorError { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + match self { + LimitadorError::StorageError(err) => { + write!(f, "error while accessing the limits storage: {err:?}") + } + LimitadorError::InterpreterError(err) => { + write!(f, "error parsing condition: {err:?}") + } + } + } +} + +impl Error for LimitadorError { + fn source(&self) -> Option<&(dyn Error + 'static)> { + match self { + LimitadorError::StorageError(err) => Some(err), + LimitadorError::InterpreterError(err) => Some(err), + } + } } impl From for LimitadorError { fn from(e: StorageErr) -> Self { - Self::Storage(e.msg().to_owned()) + Self::StorageError(e) + } +} + +impl From for LimitadorError { + fn from(err: ConditionParsingError) -> Self { + LimitadorError::InterpreterError(err) + } +} + +impl From for LimitadorError { + fn from(value: Infallible) -> Self { + unreachable!("unexpected infallible value: {:?}", value) } } diff --git a/limitador/src/lib.rs b/limitador/src/lib.rs index fd125d38..69628052 100644 --- a/limitador/src/lib.rs +++ b/limitador/src/lib.rs @@ -73,7 +73,7 @@ //! 60, //! vec!["req.method == 'GET'"], //! vec!["user_id"], -//! ); +//! ).unwrap(); //! let mut rate_limiter = RateLimiter::new(1000); //! //! // Add a limit @@ -105,7 +105,7 @@ //! 60, //! vec!["req.method == 'GET'"], //! vec!["user_id"], -//! ); +//! ).unwrap(); //! rate_limiter.add_limit(limit); //! //! // We've defined a limit of 2. So we can report 2 times before being @@ -169,7 +169,7 @@ //! 60, //! vec!["req.method == 'GET'"], //! vec!["user_id"], -//! ); +//! ).unwrap(); //! //! async { //! let rate_limiter = AsyncRateLimiter::new_with_storage( @@ -221,6 +221,8 @@ pub struct RateLimiterBuilder { storage: Storage, } +type LimitadorResult = Result; + pub struct CheckResult { pub limited: bool, pub counters: Vec, @@ -336,7 +338,7 @@ impl RateLimiter { self.storage.add_limit(limit) } - pub fn delete_limit(&self, limit: &Limit) -> Result<(), LimitadorError> { + pub fn delete_limit(&self, limit: &Limit) -> LimitadorResult<()> { self.storage.delete_limit(limit)?; Ok(()) } @@ -349,7 +351,7 @@ impl RateLimiter { .collect() } - pub fn delete_limits(&self, namespace: &Namespace) -> Result<(), LimitadorError> { + pub fn delete_limits(&self, namespace: &Namespace) -> LimitadorResult<()> { self.storage.delete_limits(namespace)?; Ok(()) } @@ -359,7 +361,7 @@ impl RateLimiter { namespace: &Namespace, values: &HashMap, delta: u64, - ) -> Result { + ) -> LimitadorResult { let counters = self.counters_that_apply(namespace, values)?; for counter in counters { @@ -381,7 +383,7 @@ impl RateLimiter { namespace: &Namespace, values: &HashMap, delta: u64, - ) -> Result<(), LimitadorError> { + ) -> LimitadorResult<()> { let counters = self.counters_that_apply(namespace, values)?; counters @@ -396,7 +398,7 @@ impl RateLimiter { values: &HashMap, delta: u64, load_counters: bool, - ) -> Result { + ) -> LimitadorResult { let mut counters = self.counters_that_apply(namespace, values)?; if counters.is_empty() { @@ -431,7 +433,7 @@ impl RateLimiter { } } - pub fn get_counters(&self, namespace: &Namespace) -> Result, LimitadorError> { + pub fn get_counters(&self, namespace: &Namespace) -> LimitadorResult> { self.storage .get_counters(namespace) .map_err(|err| err.into()) @@ -440,10 +442,7 @@ impl RateLimiter { // Deletes all the limits stored except the ones received in the params. For // every limit received, if it does not exist, it is created. If it already // exists, its associated counters are not reset. - pub fn configure_with( - &self, - limits: impl IntoIterator, - ) -> Result<(), LimitadorError> { + pub fn configure_with(&self, limits: impl IntoIterator) -> LimitadorResult<()> { let limits_to_keep_or_create = classify_limits_by_namespace(limits); let namespaces_limits_to_keep_or_create: HashSet = @@ -479,7 +478,7 @@ impl RateLimiter { &self, namespace: &Namespace, values: &HashMap, - ) -> Result, LimitadorError> { + ) -> LimitadorResult> { let limits = self.storage.get_limits(namespace); let counters = limits @@ -512,7 +511,7 @@ impl AsyncRateLimiter { self.storage.add_limit(limit) } - pub async fn delete_limit(&self, limit: &Limit) -> Result<(), LimitadorError> { + pub async fn delete_limit(&self, limit: &Limit) -> LimitadorResult<()> { self.storage.delete_limit(limit).await?; Ok(()) } @@ -525,7 +524,7 @@ impl AsyncRateLimiter { .collect() } - pub async fn delete_limits(&self, namespace: &Namespace) -> Result<(), LimitadorError> { + pub async fn delete_limits(&self, namespace: &Namespace) -> LimitadorResult<()> { self.storage.delete_limits(namespace).await?; Ok(()) } @@ -535,7 +534,7 @@ impl AsyncRateLimiter { namespace: &Namespace, values: &HashMap, delta: u64, - ) -> Result { + ) -> LimitadorResult { let counters = self.counters_that_apply(namespace, values).await?; for counter in counters { @@ -556,7 +555,7 @@ impl AsyncRateLimiter { namespace: &Namespace, values: &HashMap, delta: u64, - ) -> Result<(), LimitadorError> { + ) -> LimitadorResult<()> { let counters = self.counters_that_apply(namespace, values).await?; for counter in counters { @@ -572,7 +571,7 @@ impl AsyncRateLimiter { values: &HashMap, delta: u64, load_counters: bool, - ) -> Result { + ) -> LimitadorResult { // the above where-clause is needed in order to call unwrap(). let mut counters = self.counters_that_apply(namespace, values).await?; @@ -609,10 +608,7 @@ impl AsyncRateLimiter { } } - pub async fn get_counters( - &self, - namespace: &Namespace, - ) -> Result, LimitadorError> { + pub async fn get_counters(&self, namespace: &Namespace) -> LimitadorResult> { self.storage .get_counters(namespace) .await @@ -625,7 +621,7 @@ impl AsyncRateLimiter { pub async fn configure_with( &self, limits: impl IntoIterator, - ) -> Result<(), LimitadorError> { + ) -> LimitadorResult<()> { let limits_to_keep_or_create = classify_limits_by_namespace(limits); let namespaces_limits_to_keep_or_create: HashSet = @@ -661,7 +657,7 @@ impl AsyncRateLimiter { &self, namespace: &Namespace, values: &HashMap, - ) -> Result, LimitadorError> { + ) -> LimitadorResult> { let limits = self.storage.get_limits(namespace); let counters = limits @@ -712,7 +708,8 @@ mod test { 100, Vec::::default(), Vec::::default(), - ); + ) + .expect("This must be a valid limit!"); rl.add_limit(l.clone()); let limits = rl.get_limits(&namespace.into()); assert_eq!(limits.len(), 1); diff --git a/limitador/src/limit.rs b/limitador/src/limit.rs index 19dcaae7..94b95b1b 100644 --- a/limitador/src/limit.rs +++ b/limitador/src/limit.rs @@ -25,6 +25,8 @@ mod deprecated { } } +use crate::errors::LimitadorError; +use crate::LimitadorResult; #[cfg(feature = "lenient_conditions")] pub use deprecated::check_deprecated_syntax_usages_and_reset; @@ -296,23 +298,26 @@ impl Limit { seconds: u64, conditions: impl IntoIterator, variables: impl IntoIterator>, - ) -> Self + ) -> LimitadorResult where >::Error: core::fmt::Debug, >::Error: core::fmt::Debug, + LimitadorError: From<>::Error>, { // the above where-clause is needed in order to call unwrap(). - Self { - id: None, - namespace: namespace.into(), - max_value, - seconds, - name: None, - conditions: conditions - .into_iter() - .map(|cond| cond.try_into().expect("Invalid condition")) - .collect(), - variables: variables.into_iter().map(|var| var.into()).collect(), + let conditions: Result, _> = + conditions.into_iter().map(|cond| cond.try_into()).collect(); + match conditions { + Ok(conditions) => Ok(Self { + id: None, + namespace: namespace.into(), + max_value, + seconds, + name: None, + conditions, + variables: variables.into_iter().map(|var| var.into()).collect(), + }), + Err(err) => Err(err.into()), } } @@ -323,22 +328,21 @@ impl Limit { seconds: u64, conditions: impl IntoIterator, variables: impl IntoIterator>, - ) -> Self + ) -> LimitadorResult where - >::Error: core::fmt::Debug, - >::Error: core::fmt::Debug, + LimitadorError: From<>::Error>, { - Self { - id: Some(id.into()), - namespace: namespace.into(), - max_value, - seconds, - name: None, - conditions: conditions - .into_iter() - .map(|cond| cond.try_into().expect("Invalid condition")) - .collect(), - variables: variables.into_iter().map(|var| var.into()).collect(), + match conditions.into_iter().map(|cond| cond.try_into()).collect() { + Ok(conditions) => Ok(Self { + id: Some(id.into()), + namespace: namespace.into(), + max_value, + seconds, + name: None, + conditions, + variables: variables.into_iter().map(|var| var.into()).collect(), + }), + Err(err) => Err(err.into()), } } @@ -858,7 +862,8 @@ mod tests { #[test] fn limit_can_have_an_optional_name() { - let mut limit = Limit::new("test_namespace", 10, 60, vec!["x == \"5\""], vec!["y"]); + let mut limit = Limit::new("test_namespace", 10, 60, vec!["x == \"5\""], vec!["y"]) + .expect("This must be a valid limit!"); assert!(limit.name.is_none()); let name = "Test Limit"; @@ -868,7 +873,8 @@ mod tests { #[test] fn limit_applies() { - let limit = Limit::new("test_namespace", 10, 60, vec!["x == \"5\""], vec!["y"]); + let limit = Limit::new("test_namespace", 10, 60, vec!["x == \"5\""], vec!["y"]) + .expect("This must be a valid limit!"); let mut values: HashMap = HashMap::new(); values.insert("x".into(), "5".into()); @@ -879,7 +885,8 @@ mod tests { #[test] fn limit_does_not_apply_when_cond_is_false() { - let limit = Limit::new("test_namespace", 10, 60, vec!["x == \"5\""], vec!["y"]); + let limit = Limit::new("test_namespace", 10, 60, vec!["x == \"5\""], vec!["y"]) + .expect("This must be a valid limit!"); let mut values: HashMap = HashMap::new(); values.insert("x".into(), "1".into()); @@ -891,7 +898,8 @@ mod tests { #[test] #[cfg(feature = "lenient_conditions")] fn limit_does_not_apply_when_cond_is_false_deprecated_style() { - let limit = Limit::new("test_namespace", 10, 60, vec!["x == 5"], vec!["y"]); + let limit = Limit::new("test_namespace", 10, 60, vec!["x == 5"], vec!["y"]) + .expect("This must be a valid limit!"); let mut values: HashMap = HashMap::new(); values.insert("x".into(), "1".into()); @@ -901,7 +909,8 @@ mod tests { assert!(check_deprecated_syntax_usages_and_reset()); assert!(!check_deprecated_syntax_usages_and_reset()); - let limit = Limit::new("test_namespace", 10, 60, vec!["x == foobar"], vec!["y"]); + let limit = Limit::new("test_namespace", 10, 60, vec!["x == foobar"], vec!["y"]) + .expect("This must be a valid limit!"); let mut values: HashMap = HashMap::new(); values.insert("x".into(), "foobar".into()); @@ -914,7 +923,8 @@ mod tests { #[test] fn limit_does_not_apply_when_cond_var_is_not_set() { - let limit = Limit::new("test_namespace", 10, 60, vec!["x == \"5\""], vec!["y"]); + let limit = Limit::new("test_namespace", 10, 60, vec!["x == \"5\""], vec!["y"]) + .expect("This must be a valid limit!"); // Notice that "x" is not set let mut values: HashMap = HashMap::new(); @@ -926,7 +936,8 @@ mod tests { #[test] fn limit_does_not_apply_when_var_not_set() { - let limit = Limit::new("test_namespace", 10, 60, vec!["x == \"5\""], vec!["y"]); + let limit = Limit::new("test_namespace", 10, 60, vec!["x == \"5\""], vec!["y"]) + .expect("This must be a valid limit!"); // Notice that "y" is not set let mut values: HashMap = HashMap::new(); @@ -943,7 +954,8 @@ mod tests { 60, vec!["x == \"5\"", "y == \"2\""], vec!["z"], - ); + ) + .expect("This must be a valid limit!"); let mut values: HashMap = HashMap::new(); values.insert("x".into(), "5".into()); @@ -961,7 +973,8 @@ mod tests { 60, vec!["x == \"5\"", "y == \"2\""], vec!["z"], - ); + ) + .expect("This must be a valid limit!"); let mut values: HashMap = HashMap::new(); values.insert("x".into(), "3".into()); @@ -1045,7 +1058,8 @@ mod tests { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); assert_eq!(limit.id(), Some("test_id")) } @@ -1059,7 +1073,8 @@ mod tests { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); let mut limit2 = Limit::new( limit1.namespace.clone(), @@ -1067,7 +1082,8 @@ mod tests { limit1.seconds, limit1.conditions.clone(), limit1.variables.clone(), - ); + ) + .expect("This must be a valid limit!"); limit2.set_name("Who cares?".to_string()); assert_eq!(limit1.partial_cmp(&limit2), Some(Equal)); diff --git a/limitador/src/storage/disk/expiring_value.rs b/limitador/src/storage/disk/expiring_value.rs index 2932d6db..8ed4c48c 100644 --- a/limitador/src/storage/disk/expiring_value.rs +++ b/limitador/src/storage/disk/expiring_value.rs @@ -95,9 +95,10 @@ impl From for Vec { } impl From for StorageErr { - fn from(_: TryFromSliceError) -> Self { + fn from(e: TryFromSliceError) -> Self { Self { msg: "Corrupted byte sequence while reading 8 bytes for 64-bit integer".to_owned(), + source: Some(Box::new(e)), transient: false, } } diff --git a/limitador/src/storage/disk/mod.rs b/limitador/src/storage/disk/mod.rs index 1203313a..3bb288d7 100644 --- a/limitador/src/storage/disk/mod.rs +++ b/limitador/src/storage/disk/mod.rs @@ -8,9 +8,11 @@ pub use rocksdb_storage::RocksDbStorage as DiskStorage; impl From for StorageErr { fn from(error: rocksdb::Error) -> Self { + let transient = error.kind() == ErrorKind::TimedOut || error.kind() == ErrorKind::TryAgain; Self { msg: format!("Underlying storage error: {error}"), - transient: error.kind() == ErrorKind::TimedOut || error.kind() == ErrorKind::TryAgain, + source: Some(Box::new(error)), + transient, } } } diff --git a/limitador/src/storage/disk/rocksdb_storage.rs b/limitador/src/storage/disk/rocksdb_storage.rs index 6f2c743d..12aadce0 100644 --- a/limitador/src/storage/disk/rocksdb_storage.rs +++ b/limitador/src/storage/disk/rocksdb_storage.rs @@ -242,7 +242,8 @@ mod tests { #[test] fn opens_db_on_disk() { let namespace = "test_namespace"; - let limit = Limit::new(namespace, 1, 2, vec!["req.method == 'GET'"], vec!["app_id"]); + let limit = Limit::new(namespace, 1, 2, vec!["req.method == 'GET'"], vec!["app_id"]) + .expect("This must be a valid limit!"); let counter = Counter::new(limit, HashMap::default()); let tmp = TempDir::new().expect("We should have a dir!"); diff --git a/limitador/src/storage/in_memory.rs b/limitador/src/storage/in_memory.rs index b01eeb88..3148b6df 100644 --- a/limitador/src/storage/in_memory.rs +++ b/limitador/src/storage/in_memory.rs @@ -252,14 +252,16 @@ mod tests { fn counters_for_multiple_limit_per_ns() { let storage = InMemoryStorage::default(); let namespace = "test_namespace"; - let limit_1 = Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]); + let limit_1 = Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]) + .expect("This must be a valid limit!"); let limit_2 = Limit::new( namespace, 1, 10, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); let counter_1 = Counter::new(limit_1, HashMap::default()); let counter_2 = Counter::new(limit_2, HashMap::default()); storage.update_counter(&counter_1, 1).unwrap(); diff --git a/limitador/src/storage/keys.rs b/limitador/src/storage/keys.rs index 037d5f9b..621eb202 100644 --- a/limitador/src/storage/keys.rs +++ b/limitador/src/storage/keys.rs @@ -121,7 +121,8 @@ mod tests { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); assert_eq!( "namespace:{example.com},counters_of_limit:{\"namespace\":\"example.com\",\"seconds\":60,\"conditions\":[\"req.method == \\\"GET\\\"\"],\"variables\":[\"app_id\"]}".as_bytes(), key_for_counters_of_limit(&limit)) @@ -136,7 +137,8 @@ mod tests { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); assert_eq!( "\u{2}\u{7}test_id".as_bytes(), key_for_counters_of_limit(&limit) @@ -146,7 +148,8 @@ mod tests { #[test] fn counter_key_and_counter_are_symmetric() { let namespace = "ns_counter:"; - let limit = Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]); + let limit = Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]) + .expect("This must be a valid limit!"); let counter = Counter::new(limit.clone(), HashMap::default()); let raw = key_for_counter(&counter); assert_eq!(counter, partial_counter_from_counter_key(&raw)); @@ -155,7 +158,8 @@ mod tests { #[test] fn counter_key_does_not_include_transient_state() { let namespace = "ns_counter:"; - let limit = Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]); + let limit = Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]) + .expect("This must be a valid limit!"); let counter = Counter::new(limit.clone(), HashMap::default()); let mut other = counter.clone(); other.set_remaining(123); @@ -268,7 +272,8 @@ pub mod bin { .into_iter() .map(|(var, value)| (var.to_string(), value.to_string())) .collect(); - let limit = Limit::new(ns, u64::default(), seconds, conditions, map.keys()); + let limit = + Limit::new(ns, u64::default(), seconds, conditions, map.keys()).unwrap(); Counter::new(limit, map) } 2u8 => { @@ -286,7 +291,8 @@ pub mod bin { 0, vec![], map.keys(), - ); + ) + .unwrap(); Counter::new(limit, map) } _ => panic!("Unknown version: {}", version), @@ -316,7 +322,7 @@ pub mod bin { .map(|(var, value)| (var.to_string(), value.to_string())) .collect(); let limit = Limit::new(ns, u64::default(), seconds, conditions, map.keys()); - Counter::new(limit, map) + Counter::new(limit.unwrap(), map) } #[cfg(test)] @@ -338,7 +344,8 @@ pub mod bin { 2, vec!["foo == 'bar'"], vec!["app_id", "role", "wat"], - ); + ) + .expect("This must be a valid limit!"); let mut vars = HashMap::default(); vars.insert("role".to_string(), "admin".to_string()); vars.insert("app_id".to_string(), "123".to_string()); @@ -355,7 +362,8 @@ pub mod bin { #[test] fn counter_key_and_counter_are_symmetric() { let namespace = "ns_counter:"; - let limit = Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]); + let limit = Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]) + .expect("This must be a valid limit!"); let mut variables = HashMap::default(); variables.insert("app_id".to_string(), "123".to_string()); let counter = Counter::new(limit.clone(), variables); @@ -366,7 +374,8 @@ pub mod bin { #[test] fn counter_key_starts_with_namespace_prefix() { let namespace = "ns_counter:"; - let limit = Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]); + let limit = Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]) + .expect("This must be a valid limit!"); let counter = Counter::new(limit, HashMap::default()); let serialized_counter = key_for_counter(&counter); @@ -378,7 +387,8 @@ pub mod bin { fn counters_with_id() { let namespace = "ns_counter:"; let limit_without_id = - Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]); + Limit::new(namespace, 1, 1, vec!["req.method == 'GET'"], vec!["app_id"]) + .expect("This must be a valid limit!"); let limit_with_id = Limit::with_id( "id200", namespace, @@ -386,7 +396,8 @@ pub mod bin { 1, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); let counter_with_id = Counter::new(limit_with_id, HashMap::default()); let serialized_with_id_counter = key_for_counter(&counter_with_id); diff --git a/limitador/src/storage/mod.rs b/limitador/src/storage/mod.rs index 403d21a6..064cfb6c 100644 --- a/limitador/src/storage/mod.rs +++ b/limitador/src/storage/mod.rs @@ -3,8 +3,9 @@ use crate::limit::{Limit, Namespace}; use crate::InMemoryStorage; use async_trait::async_trait; use std::collections::{HashMap, HashSet}; +use std::error::Error; +use std::fmt::{Display, Formatter}; use std::sync::{Arc, RwLock}; -use thiserror::Error; #[cfg(feature = "disk_storage")] pub mod disk; @@ -308,13 +309,25 @@ pub trait AsyncCounterStorage: Sync + Send { async fn clear(&self) -> Result<(), StorageErr>; } -#[derive(Error, Debug)] -#[error("error while accessing the limits storage: {msg}")] +#[derive(Debug)] pub struct StorageErr { msg: String, + source: Option>, transient: bool, } +impl Display for StorageErr { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!(f, "counter storage error: {}", self.msg) + } +} + +impl Error for StorageErr { + fn source(&self) -> Option<&(dyn Error + 'static)> { + self.source.as_ref().map(|source| source.as_ref()) + } +} + impl StorageErr { pub fn msg(&self) -> &str { &self.msg diff --git a/limitador/src/storage/redis/counters_cache.rs b/limitador/src/storage/redis/counters_cache.rs index 35152537..52e87136 100644 --- a/limitador/src/storage/redis/counters_cache.rs +++ b/limitador/src/storage/redis/counters_cache.rs @@ -682,7 +682,8 @@ mod tests { 60, vec!["req.method == 'POST'"], vec!["app_id"], - ), + ) + .expect("This must be a valid limit!"), values, ) } diff --git a/limitador/src/storage/redis/mod.rs b/limitador/src/storage/redis/mod.rs index 93167908..dbdad8b3 100644 --- a/limitador/src/storage/redis/mod.rs +++ b/limitador/src/storage/redis/mod.rs @@ -21,12 +21,14 @@ pub use redis_sync::RedisStorage; impl From for StorageErr { fn from(e: RedisError) -> Self { + let transient = e.is_timeout() + || e.is_connection_dropped() + || e.is_cluster_error() + || e.is_connection_refusal(); Self { msg: e.to_string(), - transient: e.is_timeout() - || e.is_connection_dropped() - || e.is_cluster_error() - || e.is_connection_refusal(), + source: Some(Box::new(e)), + transient, } } } diff --git a/limitador/src/storage/redis/redis_cached.rs b/limitador/src/storage/redis/redis_cached.rs index fe47994f..8f1b58dc 100644 --- a/limitador/src/storage/redis/redis_cached.rs +++ b/limitador/src/storage/redis/redis_cached.rs @@ -446,7 +446,8 @@ mod tests { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ), + ) + .expect("This must be a valid limit!"), Default::default(), ); @@ -508,7 +509,8 @@ mod tests { 60, vec!["req.method == 'POST'"], vec!["app_id"], - ), + ) + .expect("This must be a valid limit!"), Default::default(), ); @@ -567,7 +569,8 @@ mod tests { 60, vec!["req.method == 'POST'"], vec!["app_id"], - ), + ) + .expect("This must be a valid limit!"), Default::default(), ); diff --git a/limitador/src/storage/redis/redis_sync.rs b/limitador/src/storage/redis/redis_sync.rs index f9b655fa..9e136096 100644 --- a/limitador/src/storage/redis/redis_sync.rs +++ b/limitador/src/storage/redis/redis_sync.rs @@ -236,6 +236,7 @@ impl From<::r2d2::Error> for StorageErr { fn from(e: ::r2d2::Error) -> Self { Self { msg: e.to_string(), + source: Some(Box::new(e)), transient: false, } } diff --git a/limitador/tests/integration_tests.rs b/limitador/tests/integration_tests.rs index 49fafc45..8c475df4 100644 --- a/limitador/tests/integration_tests.rs +++ b/limitador/tests/integration_tests.rs @@ -222,14 +222,16 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ), + ) + .expect("This must be a valid limit!"), Limit::new( "second_namespace", 20, 60, vec!["req.method == 'GET'"], vec!["app_id"], - ), + ) + .expect("This must be a valid limit!"), ]; for limit in limits { @@ -254,7 +256,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); let lim2 = Limit::new( "second_namespace", @@ -262,7 +265,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); for limit in [&lim1, &lim2] { rate_limiter.add_limit(limit).await; @@ -286,7 +290,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -306,7 +311,8 @@ mod test { 60, vec!["req.method == 'GET'"], Vec::::new(), - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -328,7 +334,8 @@ mod test { 60, vec!["req.method == 'POST'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); let limit_2 = Limit::new( namespace, @@ -336,7 +343,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit_1).await; rate_limiter.add_limit(&limit_2).await; @@ -355,7 +363,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -372,7 +381,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -407,14 +417,16 @@ mod test { 60, vec!["req.method == 'POST'"], vec!["app_id"], - ), + ) + .expect("This must be a valid limit!"), Limit::new( namespace, 5, 60, vec!["req.method == 'GET'"], vec!["app_id"], - ), + ) + .expect("This must be a valid limit!"), ]; for limit in limits.iter() { @@ -433,16 +445,16 @@ mod test { let namespace2 = "test_namespace_2"; rate_limiter - .add_limit(&Limit::new( - namespace1, - 10, - 60, - vec!["x == '10'"], - vec!["z"], - )) + .add_limit( + &Limit::new(namespace1, 10, 60, vec!["x == '10'"], vec!["z"]) + .expect("This must be a valid limit!"), + ) .await; rate_limiter - .add_limit(&Limit::new(namespace2, 5, 60, vec!["x == '10'"], vec!["z"])) + .add_limit( + &Limit::new(namespace2, 5, 60, vec!["x == '10'"], vec!["z"]) + .expect("This must be a valid limit!"), + ) .await; rate_limiter.delete_limits(namespace1).await.unwrap(); @@ -459,7 +471,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -493,7 +506,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -530,7 +544,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -567,14 +582,16 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ), + ) + .expect("This must be a valid limit!"), Limit::new( namespace, max_hits + 1, 60, vec!["req.method == 'POST'"], vec!["app_id"], - ), + ) + .expect("This must be a valid limit!"), ]; for limit in limits { @@ -635,7 +652,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -670,7 +688,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -693,7 +712,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -747,7 +767,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -771,7 +792,8 @@ mod test { 60, Vec::::new(), // unconditional vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -794,7 +816,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -831,7 +854,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -881,7 +905,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -910,7 +935,8 @@ mod test { 60, Vec::::new(), // unconditional vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -938,7 +964,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -995,7 +1022,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -1016,7 +1044,8 @@ mod test { limit_time, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -1041,7 +1070,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); let second_limit = Limit::new( "second_namespace", @@ -1049,7 +1079,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter .configure_with(vec![first_limit.clone(), second_limit.clone()]) @@ -1080,7 +1111,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit).await; @@ -1119,7 +1151,8 @@ mod test { 1, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); let limit_to_be_deleted = Limit::new( namespace, @@ -1127,7 +1160,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); for limit in [&limit_to_be_kept, &limit_to_be_deleted].iter() { rate_limiter.add_limit(limit).await; @@ -1153,7 +1187,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); let limit_update = Limit::new( namespace, @@ -1161,7 +1196,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); rate_limiter.add_limit(&limit_orig).await; @@ -1185,7 +1221,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); let limit_2 = Limit::new( namespace, @@ -1193,7 +1230,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); let mut limit_3 = Limit::new( namespace, @@ -1201,7 +1239,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); limit_3.set_name("Name is irrelevant too".to_owned()); assert!(rate_limiter.add_limit(&limit_1).await); @@ -1230,7 +1269,8 @@ mod test { 60, vec!["req.method == 'GET'"], vec!["app_id"], - ); + ) + .expect("This must be a valid limit!"); for rate_limiter in rate_limiters.iter() { rate_limiter.add_limit(&limit).await;