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

String indexing weirdly worded #4234

Open
Leafmun-certii opened this issue Feb 21, 2025 · 0 comments
Open

String indexing weirdly worded #4234

Leafmun-certii opened this issue Feb 21, 2025 · 0 comments

Comments

@Leafmun-certii
Copy link

  • I have searched open and closed issues and pull requests for duplicates, using these search terms:
    • 8.2
    • 8-2
    • string slice
  • I have checked the latest main branch to see if this has already been fixed, in this file:
    • No

URL to the section(s) of the book with this problem:
https://github.com/rust-lang/book/blob/main/src/ch08-02-strings.md#slicing-strings

Description of the problem:
In the following sentence

If you really need to use indices to create string slices, therefore, Rust asks you to be more specific.
The "therefore" breaks up the flow of the sentence in a way that is confusing.

Suggested fix:
Either therefore at the start of the sentence:

Therefore, if you really need to use indices to create string slices, Rust asks you to be more specific.
Or remove it all together to make the conclusion more impactful:
If you really need to use indices to create string slices, Rust will ask you to be more specific.

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

No branches or pull requests

1 participant