Skip to content

Commit

Permalink
Update helloworld-tutorial.md - Fix Clippy lints (#1617)
Browse files Browse the repository at this point in the history
warning: useless conversion to the same type: `std::string::String`
  • Loading branch information
netanelrabinowitz authored Feb 2, 2024
1 parent 4859a73 commit 4227468
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/helloworld-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl Greeter for MyGreeter {
println!("Got a request: {:?}", request);

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

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

let reply = hello_world::HelloReply {
message: format!("Hello {}!", request.into_inner().name).into(),
message: format!("Hello {}!", request.into_inner().name),
};

Ok(Response::new(reply))
Expand Down

0 comments on commit 4227468

Please sign in to comment.