diff --git a/backend/Cargo.lock b/backend/Cargo.lock index b890454e..f564f1f9 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -87,7 +87,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.32", ] [[package]] @@ -572,7 +572,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.32", ] [[package]] @@ -734,7 +734,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.32", ] [[package]] @@ -1106,7 +1106,7 @@ checksum = "ce243b1bfa62ffc028f1cc3b6034ec63d649f3031bc8a4fbbb004e1ac17d1f68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.32", ] [[package]] @@ -1441,7 +1441,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.32", ] [[package]] @@ -1527,7 +1527,7 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.32", ] [[package]] @@ -1577,12 +1577,12 @@ checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "prettyplease" -version = "0.1.25" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 1.0.109", + "syn 2.0.32", ] [[package]] @@ -1629,9 +1629,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.11.9" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", "prost-derive", @@ -1639,44 +1639,44 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.11.9" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" dependencies = [ "bytes", "heck", "itertools", - "lazy_static", "log", "multimap", + "once_cell", "petgraph", "prettyplease", "prost", "prost-types", "regex", - "syn 1.0.109", + "syn 2.0.32", "tempfile", "which", ] [[package]] name = "prost-derive" -version = "0.11.9" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.32", ] [[package]] name = "prost-types" -version = "0.11.9" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" dependencies = [ "prost", ] @@ -1995,7 +1995,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.32", ] [[package]] @@ -2036,7 +2036,7 @@ dependencies = [ "proc-macro2", "quote", "sea-bae", - "syn 2.0.28", + "syn 2.0.32", "unicode-ident", ] @@ -2096,7 +2096,7 @@ checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.32", ] [[package]] @@ -2507,9 +2507,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" dependencies = [ "proc-macro2", "quote", @@ -2558,7 +2558,7 @@ checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.32", ] [[package]] @@ -2650,7 +2650,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.32", ] [[package]] @@ -2734,17 +2734,15 @@ dependencies = [ [[package]] name = "tonic" -version = "0.9.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" dependencies = [ "async-stream", "async-trait", "axum", "base64", "bytes", - "futures-core", - "futures-util", "h2", "http", "http-body", @@ -2753,6 +2751,7 @@ dependencies = [ "percent-encoding", "pin-project", "prost", + "rustls", "rustls-pemfile", "tokio", "tokio-rustls", @@ -2765,30 +2764,30 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.9.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6fdaae4c2c638bb70fe42803a26fbd6fc6ac8c72f5c59f67ecc2a2dcabf4b07" +checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" dependencies = [ "prettyplease", "proc-macro2", "prost-build", "quote", - "syn 1.0.109", + "syn 2.0.32", ] [[package]] name = "tonic-web" -version = "0.9.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b00ec4842256d1fe0a46176e2ef5bc357664c66e7d91aff5a7d43d83a65f47" +checksum = "0fddb2a37b247e6adcb9f239f4e5cefdcc5ed526141a416b943929f13aea2cce" dependencies = [ "base64", "bytes", - "futures-core", "http", "http-body", "hyper", "pin-project", + "tokio-stream", "tonic", "tower-http", "tower-layer", @@ -2866,7 +2865,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.32", ] [[package]] diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 2c6b7532..7481a240 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -11,9 +11,9 @@ members = ["entity"] [dependencies] log = "0.4.18" paste = "1.0.12" -prost = "0.11.9" +prost = "0.12.3" toml = "0.7.4" -prost-types = "0.11.9" +prost-types = "0.12.3" entity = { path = "./entity" } chrono = "0.4.26" thiserror = "1.0.44" @@ -24,7 +24,7 @@ futures = "0.3.29" bincode = "1.3.3" base64 = "0.21.5" uuid = "1.5.0" -tonic-web = "0.9.2" +tonic-web = "0.10.2" quick_cache = "0.4.0" leaky-bucket = "1.0.1" hickory-resolver = "0.24.0" @@ -60,7 +60,7 @@ version = "1.0.163" features = ["derive"] [dependencies.tonic] -version = "0.9.2" +version = "0.10.2" features = ["transport", "channel", "codegen", "tls", "prost"] [dependencies.spin] @@ -68,7 +68,7 @@ version = "0.9.8" features = ["mutex","spin_mutex","rwlock"] [build-dependencies] -tonic-build = "0.9.2" +tonic-build = "0.10.2" [features] default = ["single-instance"] diff --git a/backend/src/endpoint/util/pagination.rs b/backend/src/endpoint/util/pagination.rs index c3cc973e..49b25e8a 100644 --- a/backend/src/endpoint/util/pagination.rs +++ b/backend/src/endpoint/util/pagination.rs @@ -155,8 +155,7 @@ where let sort = match pager.sort { RawSearchDep::Text(x) => SearchDep::Text(x), RawSearchDep::Column(sort_by, reverse) => { - let sort_by = SortBy::from_i32(sort_by) - .ok_or(Error::PaginationError("Pager reconstruction failed"))?; + let sort_by = sort_by.try_into() .map_err(|_|Error::PaginationError("Pager reconstruction failed"))?; SearchDep::Column(sort_by, reverse) } RawSearchDep::Parent(x) => SearchDep::Parent(x), @@ -285,8 +284,7 @@ where let sort = match pager.sort { RawSearchDep::Text(x) => SearchDep::Text(x), RawSearchDep::Column(sort_by, reverse) => { - let sort_by = SortBy::from_i32(sort_by) - .ok_or(Error::PaginationError("Pager reconstruction failed"))?; + let sort_by = sort_by.try_into() .map_err(|_|Error::PaginationError("Pager reconstruction failed"))?; SearchDep::Column(sort_by, reverse) } RawSearchDep::Parent(_) => {