From 42274686befb0440c038e6f53fcc68fdb3dcf51e Mon Sep 17 00:00:00 2001 From: Netanel Rabinowitz Date: Fri, 2 Feb 2024 21:36:50 +0200 Subject: [PATCH] Update helloworld-tutorial.md - Fix Clippy lints (#1617) warning: useless conversion to the same type: `std::string::String` --- examples/helloworld-tutorial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/helloworld-tutorial.md b/examples/helloworld-tutorial.md index af1f097cf..8c494db5a 100644 --- a/examples/helloworld-tutorial.md +++ b/examples/helloworld-tutorial.md @@ -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 @@ -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))