-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Suggestions: Misc #70
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
Comments
Hey, just a quick comment for one part above:
Yes, I agree with you, I should change these getters to do something more complicated.
Yeah, thanks! |
When teaching, the definition of
This becomes clear on the next slide as well as in the standard library docs where the K, V, and S type parameters are all worth discussing. These are no longer present, but this exercise could admittedly use some work (#1513).
To me it makes sense--the body of the |
Option
andResult
definitions here. They'll see the variants everywhere in Rust.HashMap
doesn't have to be keyed with a&str
orString
(unlike a JSON object, say).&'a mut Thing<'a>
errors.But also on that page and on this one, you say
That can be misinterpreted as "the borrow is valid for at least
'a
", as opposed to "thePoint
is valid for at least'a
". I.e. it might given the mistaken impression that a borrow can be lengthened.Result<_, _>
.More generally, it may give the impression that using getters and setters is idiomatic (even in the same module).
Box<Self>
.mod in_another_file;
. Also perhaps note that (except perhaps fortest
modules) separate files is the norm.The text was updated successfully, but these errors were encountered: