Skip to content

Commit 5182252

Browse files
authored
feat: Update to prost 0.14 (#2300)
1 parent 6d1a6a0 commit 5182252

File tree

35 files changed

+62
-144
lines changed

35 files changed

+62
-144
lines changed

codegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = "MIT"
55
edition = "2021"
66

77
[dependencies]
8-
protox = "0.8"
8+
protox = "0.9"
99
prettyplease = "0.2"
1010
quote = "1"
1111
syn = "2"

examples/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ default = ["full"]
279279
[dependencies]
280280
# Common dependencies
281281
tokio = { version = "1.0", features = ["rt-multi-thread", "macros"] }
282-
prost = "0.13"
282+
prost = "0.14"
283283
tonic = { path = "../tonic" }
284284
# Optional dependencies
285285
tonic-web = { path = "../tonic-web", optional = true }
@@ -295,7 +295,7 @@ serde = { version = "1.0", features = ["derive"], optional = true }
295295
serde_json = { version = "1.0", optional = true }
296296
tracing = { version = "0.1.16", optional = true }
297297
tracing-subscriber = { version = "0.3", features = ["tracing-log", "fmt"], optional = true }
298-
prost-types = { version = "0.13", optional = true }
298+
prost-types = { version = "0.14", optional = true }
299299
http = { version = "1", optional = true }
300300
hyper = { version = "1", optional = true }
301301
hyper-util = { version = "0.1.4", optional = true }

examples/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::{env, path::PathBuf};
22

33
fn main() {
44
tonic_build::configure()
5-
.type_attribute("routeguide.Point", "#[derive(Hash)]")
65
.compile_protos(&["proto/routeguide/route_guide.proto"], &["proto"])
76
.unwrap();
87

examples/helloworld-tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ path = "src/client.rs"
113113

114114
[dependencies]
115115
tonic = "*"
116-
prost = "0.13"
116+
prost = "0.14"
117117
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
118118

119119
[build-dependencies]

examples/routeguide-tutorial.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Edit `Cargo.toml` and add all the dependencies we'll need for this example:
175175
```toml
176176
[dependencies]
177177
tonic = "*"
178-
prost = "0.13"
178+
prost = "0.14"
179179
tokio = { version = "1.0", features = ["rt-multi-thread", "macros", "sync", "time"] }
180180
tokio-stream = "0.1"
181181

@@ -335,27 +335,6 @@ the corresponding `data` module to load and deserialize it in
335335
**Note:** If you are following along, you'll need to change the data file's path from
336336
`examples/data/route_guide_db.json` to `data/route_guide_db.json`.
337337

338-
Next, we need to implement `Hash` and `Eq` for `Point`, so we can use point values as map keys:
339-
340-
```rust
341-
use std::hash::{Hasher, Hash};
342-
```
343-
344-
```rust
345-
impl Hash for Point {
346-
fn hash<H>(&self, state: &mut H)
347-
where
348-
H: Hasher,
349-
{
350-
self.latitude.hash(state);
351-
self.longitude.hash(state);
352-
}
353-
}
354-
355-
impl Eq for Point {}
356-
357-
```
358-
359338
Lastly, we need implement two helper functions: `in_range` and `calc_distance`. We'll use them
360339
when performing feature lookups. You can find them in
361340
[examples/src/routeguide/server.rs][in-range-fn].

examples/src/routeguide/server.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
148148
Ok(())
149149
}
150150

151-
impl Eq for Point {}
152-
153151
fn in_range(point: &Point, rect: &Rectangle) -> bool {
154152
use std::cmp;
155153

interop/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pico-args = {version = "0.5", features = ["eq-separator"]}
1919
console = "0.15"
2020
http = "1"
2121
http-body-util = "0.1"
22-
prost = "0.13"
22+
prost = "0.14"
2323
tokio = {version = "1.0", features = ["rt-multi-thread", "time", "macros"]}
2424
tokio-stream = "0.1"
2525
tonic = {path = "../tonic", features = ["tls-ring"]}

tests/ambiguous_methods/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "ambiguous_methods"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
prost = "0.13"
10+
prost = "0.14"
1111
tonic = {path = "../../tonic"}
1212

1313
[build-dependencies]

tests/compression/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ http-body-util = "0.1"
1212
hyper-util = "0.1"
1313
paste = "1.0.12"
1414
pin-project = "1.0"
15-
prost = "0.13"
15+
prost = "0.14"
1616
tokio = {version = "1.0", features = ["macros", "rt-multi-thread", "net"]}
1717
tokio-stream = "0.1"
1818
tonic = {path = "../../tonic", features = ["gzip", "deflate", "zstd"]}

tests/deprecated_methods/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license = "MIT"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
prost = "0.13"
9+
prost = "0.14"
1010
tonic = { path = "../../tonic" }
1111

1212
[build-dependencies]

0 commit comments

Comments
 (0)