summary refs log tree commit diff
path: root/src/doc/trpl/error-handling.md
AgeCommit message (Collapse)AuthorLines
2015-07-13Fixed snippet to return the proper error.Jose Narvaez-1/+3
2015-06-22Use a more descriptive variable name.Jake Hickey-3/+3
I'm currently reading the rust book and this variable name tripped me up. Because it was called "input", I thought at first it might contain the line read by read_line(). This new variable name will be more instructive to rust beginners.
2015-05-30Fixes consistency in before/after examplefrankamp-1/+1
The doc indicates that you can replace 'before' with 'after' showing the use of try!. The two examples should be equivalent, but they are not. In the File::create we were inducing a panic before in case of error, not propagating. It is important for newbies (like myself) to understand that try! propagates failures, while unwrap can induce a panic. The other alternative is to make the 'before' File::create also manually handle Err like the other calls. Either way it would be consistent.
2015-05-18TRPL: Normalize rust Code Block MarkersPascal Hertleif-4/+4
`{rust,ignore}` -> `rust,ignore
2015-05-13trpl/error-handling - fix typoSwaroop C H-1/+1
2015-05-13Add link to Debug traitSwaroop C H-0/+2
I don't recall reading about this `Debug` trait so far in the book.
2015-05-12book: typo fixes, wording improvements.Shmuale Mark-1/+1
The text in iterators.md wasn't wrong, but it read awkwardly to my ear.
2015-05-10Update error-handling.mdIsaac Ge-1/+1
Fix two typos while `io::stdin().read_line()` returns `Result` actually Signed-off-by: acgtyrant <acgtyrant@gmail.com>
2015-05-03=BG= minor: File::open --> File::create in rust bookBrendan Graetz-2/+2
- `FIle::open` is for opening a file in read-only mode - `FIle::create` is for opening a file in write-only mode, which is what we want instead for this example to make sense
2015-04-16remove example usage of from_str in error docsSteve Klabnik-15/+18
Fixes #24185
2015-04-16Fix some broken links in the bookFlorian Hartwig-1/+1
2015-04-13Point to From trait in error handling guidefenduru-1/+1
Not sure if `From<Error>` is the correct way to reference that trait (maybe `From<E: Error>`?)
2015-04-01Fix rust book error-handling.md for new std::io.kgv-6/+7
Fix example and some text for: `read_line` takes `&mut String` and return `Result` instead `IoResult`.
2015-02-24Mention try macro in error chapterSteve Klabnik-0/+72
Fixes #22342
2015-01-29s/Show/Debug/gJorge Aparicio-2/+2
2015-01-17doc: Remove extra whitespace in the middle of lines to provide alignmentNick Howell-6/+6
"Idiomatic code should not use extra whitespace in the middle of a line to provide alignment." http://aturon.github.io/style/whitespace.html I realize the linked page still needs an RFC, but the docs should be written in accordance with the guidelines nevertheless.
2015-01-17Fix up titles of TRPL chaptersSteve Klabnik-1/+1
2015-01-12Purge references to Rust tasks from TRPL.Paul Crowley-2/+2
2015-01-10Add Line Break to Robert Burns QuotePascal Hertleif-1/+1
2015-01-08Standardize punctuation & formatting of TRPLKevin Yap-6/+6
This commit is an attempt to standardize the use of punctuation and formatting in "The Rust Programming Language" as discussed in #19823. - Convert bold text to italicized textcwhen referring to terminology. - Convert single-quoted text to italicized or double-quoted text, depending on context. - Use double quotes only in the case of scare quotes or quotations.
2015-01-08Fix dead links in the guide and reorganizeAlex Crichton-0/+228