Maybe it's me, but I really needed an example to understand if let and refutable statements.
Playpen: http://is.gd/mjX3Gf
Let me know if the variable names are too, uh, culinary.
Several Minor API / Reference Documentation Fixes
- Fix a few small errors in the reference.
- Fix paper cuts in the API docs.
Fixes#24882Fixes#25233Fixes#25250
The reference was claiming all vectors all bounds-checked at run-time, when constant vectors are usually checked at compile-time.
For the changed example see http://is.gd/28ak9E
Also fixed a minor grammar issue.
There were still some mentions of `~[T]` and `~T`, mostly in comments and debugging statements. I tried to do my best to preserve meaning, but I might have gotten some wrong-- I'm happy to fix anything :)
The reference was claiming all vectors all bounds-checked at run-time, when constant vectors are usually checked at compile-time.
For the changed example see http://is.gd/28ak9E
I think there's a trivial missing word in the Mutability document. I reformatted the resulting paragraph in vim, which seems to match what the rest of the document is doing as far as word wrapping.
Edit: I found another minor thing as I continued reading.
P.S. I'm re-reading the docs, since so much has changed since my first read, and they've gotten even better! Nice job!
r? @steveklabnik
I was profiling my code again and this time AsRef<str> for String
was eating up a considerable chunk of my runtime; adding the inline
annotation made the program run almost twice as fast!
While I was at it I also added the annotation to other implementations
of AsRef as well as AsMut.
This was added in d2f8074 along with the AssocSpace stuff. The AssocSpace
stuff was then removed in de8e0ae, except it seems the comment here was missed.
Fixes the problem in #16974 with unhelpful error messages when accidentally using the wrong syntax for the `crate_type="lib"` attribute. The attribute syntax error now shows up instead of "main function not found".
Hiiiii Rust, it's me again, Carol ;)
Based on the unused files that I found hanging out and that I removed in #25231, I looked at the rest of the auxiliary files to see if there were any more not being used. Guess what!! There were!!!!! ;)
Have I mentioned how much I enjoy deleting code? ;) ;) ;) <3