Skip to content

Commit

Permalink
chore: ⬆️ upgrade tonic
Browse files Browse the repository at this point in the history
  • Loading branch information
Eason0729 committed Dec 7, 2023
1 parent 47acf86 commit 76e811a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 47 deletions.
75 changes: 37 additions & 38 deletions backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -60,15 +60,15 @@ version = "1.0.163"
features = ["derive"]

[dependencies.tonic]
version = "0.9.2"
version = "0.10.2"
features = ["transport", "channel", "codegen", "tls", "prost"]

[dependencies.spin]
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"]
Expand Down
6 changes: 2 additions & 4 deletions backend/src/endpoint/util/pagination.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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(_) => {
Expand Down

0 comments on commit 76e811a

Please sign in to comment.