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

No explanation of type str in chapters 1 - 4.2 #225

Open
fktyf-13 opened this issue Nov 15, 2024 · 0 comments
Open

No explanation of type str in chapters 1 - 4.2 #225

fktyf-13 opened this issue Nov 15, 2024 · 0 comments

Comments

@fktyf-13
Copy link

  • I have searched open and closed issues and pull requests for duplicates, using these search terms:

  • I have checked the latest main branch to see if this has already been fixed, in this file:

URL to the section(s) of the book with this problem:https://rust-book.cs.brown.edu/ch04-02-references-and-borrowing.html#permissions-are-returned-at-the-end-of-a-references-lifetime

Description of the problem:

I read without skips. I came to ch 4.2, section Permissions Are Returned At The End of a Reference’s Lifetime
and in quiz found function definition:
fn get_first(v: &Vec) -> &str {

What is str? I looked throw previous chapters and found no explanation.

Suggested fix:
Suggest to give explanation.

In general, the chapter 4 is full of complex concepts which are explained with examples with unknown types. It is very confusing. Don't use so many unknown types, or (at least) give their index with short explanations before this chapter.

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