Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: simplify helloworld-tutorial #1369

Merged
merged 2 commits into from
May 31, 2024
Merged

docs: simplify helloworld-tutorial #1369

merged 2 commits into from
May 31, 2024

Conversation

punkeel
Copy link
Contributor

@punkeel punkeel commented Apr 22, 2023

  • Remove the hello_world crate prefix, HelloReply is imported directly.
  • Remove useless calls to into():

error: useless conversion to the same type: std::string::String
--> src/main.rs:18:22
|
18 | message: format!("Hello {}!", request.into_inner().name).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing .into(): format!("Hello {}!", request.into_inner().name)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: -D clippy::useless-conversion implied by -D warnings

Motivation

Minor changes to simplify the Getting started guide a bit.

- Remove the `hello_world` crate prefix, `HelloReply` is imported directly.
- Remove useless calls to `into()`:

error: useless conversion to the same type: `std::string::String`
  --> src/main.rs:18:22
   |
18 |             message: format!("Hello {}!", request.into_inner().name).into(),
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Hello {}!", request.into_inner().name)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
   = note: `-D clippy::useless-conversion` implied by `-D warnings`
@tottoto tottoto added this pull request to the merge queue May 31, 2024
Merged via the queue into hyperium:master with commit d9fa673 May 31, 2024
16 checks passed
@tottoto
Copy link
Collaborator

tottoto commented May 31, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants