Skip to content

Commit 2dd09c0

Browse files
authored
chore: Fix clippy lint (#1181)
1 parent 3076e82 commit 2dd09c0

File tree

23 files changed

+98
-62
lines changed

23 files changed

+98
-62
lines changed

examples/src/blocking/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl Greeter for MyGreeter {
2121
println!("Got a request: {:?}", request);
2222

2323
let reply = hello_world::HelloReply {
24-
message: format!("Hello {}!", request.into_inner().name).into(),
24+
message: format!("Hello {}!", request.into_inner().name),
2525
};
2626

2727
Ok(Response::new(reply))

interop/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl fmt::Display for TestAssertion {
113113
macro_rules! test_assert {
114114
($description:expr, $assertion:expr) => {
115115
if $assertion {
116-
crate::TestAssertion::Passed {
116+
$crate::TestAssertion::Passed {
117117
description: $description,
118118
}
119119
} else {
@@ -126,11 +126,11 @@ macro_rules! test_assert {
126126
};
127127
($description:expr, $assertion:expr, $why:expr) => {
128128
if $assertion {
129-
crate::TestAssertion::Passed {
129+
$crate::TestAssertion::Passed {
130130
description: $description,
131131
}
132132
} else {
133-
crate::TestAssertion::Failed {
133+
$crate::TestAssertion::Failed {
134134
description: $description,
135135
expression: stringify!($assertion),
136136
why: Some($why),

tests/disable_comments/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ prost = "0.11"
1313
tonic = { path = "../../tonic" }
1414

1515
[build-dependencies]
16-
prost-build = "0.11"
16+
prost-build = "0.11.4"
1717
tonic-build = { path = "../../tonic-build" }

tests/disable_comments/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fn main() {
22
let mut config = prost_build::Config::default();
3-
config.disable_comments(&["test.Input1", "test.Output1"]);
3+
config.disable_comments(["test.Input1", "test.Output1"]);
44
tonic_build::configure()
55
.disable_comments("test.Service1")
66
.disable_comments("test.Service1.Rpc1")

tests/extern_path/uuid/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ version = "0.1.0"
1212
bytes = "1.0"
1313
prost = "0.11"
1414
[build-dependencies]
15-
prost-build = "0.11"
15+
prost-build = "0.11.4"

tests/integration_tests/tests/streams.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async fn status_from_server_stream_with_source() {
1717
&self,
1818
_: Request<InputStream>,
1919
) -> Result<Response<Self::StreamCallStream>, Status> {
20-
let s = Unsync(0 as *mut ());
20+
let s = Unsync(std::ptr::null_mut::<()>());
2121

2222
Ok(Response::new(Box::pin(s) as Self::StreamCallStream))
2323
}

tests/root-crate-path/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[allow(clippy::derive_partial_eq_without_eq)]
12
#[derive(Clone, PartialEq, ::prost::Message)]
23
pub struct Animal {
34
#[prost(string, optional, tag = "1")]

tests/wellknown-compiled/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ prost = "0.11"
1616
tonic = {path = "../../tonic"}
1717

1818
[build-dependencies]
19-
prost-build = "0.11"
19+
prost-build = "0.11.4"
2020
tonic-build = {path = "../../tonic-build"}

tonic-build/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ version = "0.8.4"
1717
[dependencies]
1818
prettyplease = { version = "0.1" }
1919
proc-macro2 = "1.0"
20-
prost-build = { version = "0.11.2", optional = true }
20+
prost-build = { version = "0.11.4", optional = true }
2121
quote = "1.0"
2222
syn = "1.0"
2323

tonic-health/src/generated/grpc.health.v1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
#[allow(clippy::derive_partial_eq_without_eq)]
12
#[derive(Clone, PartialEq, ::prost::Message)]
23
pub struct HealthCheckRequest {
34
#[prost(string, tag = "1")]
45
pub service: ::prost::alloc::string::String,
56
}
7+
#[allow(clippy::derive_partial_eq_without_eq)]
68
#[derive(Clone, PartialEq, ::prost::Message)]
79
pub struct HealthCheckResponse {
810
#[prost(enumeration = "health_check_response::ServingStatus", tag = "1")]

0 commit comments

Comments
 (0)