Skip to content

Commit 4227468

Browse files
Update helloworld-tutorial.md - Fix Clippy lints (#1617)
warning: useless conversion to the same type: `std::string::String`
1 parent 4859a73 commit 4227468

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/helloworld-tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl Greeter for MyGreeter {
167167
println!("Got a request: {:?}", request);
168168

169169
let reply = hello_world::HelloReply {
170-
message: format!("Hello {}!", request.into_inner().name).into(), // We must use .into_inner() as the fields of gRPC requests and responses are private
170+
message: format!("Hello {}!", request.into_inner().name), // We must use .into_inner() as the fields of gRPC requests and responses are private
171171
};
172172

173173
Ok(Response::new(reply)) // Send back our formatted greeting
@@ -216,7 +216,7 @@ impl Greeter for MyGreeter {
216216
println!("Got a request: {:?}", request);
217217

218218
let reply = hello_world::HelloReply {
219-
message: format!("Hello {}!", request.into_inner().name).into(),
219+
message: format!("Hello {}!", request.into_inner().name),
220220
};
221221

222222
Ok(Response::new(reply))

0 commit comments

Comments
 (0)