-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Remove io::io_error #11946
Merged
Merged
Remove io::io_error #11946
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Needs a rebase already! |
plays taps |
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
//! Implementations of I/O traits for the Option type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is outdated.
awesome work! |
Hoo boy, that's a biggun! |
* All I/O now returns IoResult<T> = Result<T, IoError> * All formatting traits now return fmt::Result = IoResult<()> * The if_ok!() macro was added to libstd
* Stop referencing io_error * Start changing "Failure" sections to "Error" sections * Update all doc examples to work.
bors
added a commit
that referenced
this pull request
Feb 3, 2014
Turns out this was a little more far-reaching than I thought it was. The first commit is the crux of this stack of commits. The `io::io_error` condition is completely removed and the `read` and `write` methods are altered to return `IoResult<T>`. This turned out to be an incredibly far-reaching change! Overall, I'm very happy with how this turned out (in addition with the `unused_must_use` lint). I had to almost rewrite the pretty printer in `libsyntax` as well as the the formatting in `librustdoc` (as one would expect). These two modules do *tons* of I/O, and I believe that it's definitely improved. This pull request also introduces the `if_ok!()` macro for returning-early from something that returns a result. I made quite liberal use of this in mostly the pretty printer and html renderer, and I found its usage generally quite pleasant and convenient to have. I didn't really feel like adding any other macro while I was using it, and I figured that pretty printing could be nicer, but it's nowhere near horrid today. This may be a controversial issue closing, but I'm going to say it. Closes #6163
28 tasks
cadencemarseille
added a commit
to cadencemarseille/rust-pcre
that referenced
this pull request
Feb 9, 2014
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Dec 28, 2023
…r=blyxyas,xFrednet fix: broken GitHub corner changelog: none fixes rust-lang#11946
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Turns out this was a little more far-reaching than I thought it was.
The first commit is the crux of this stack of commits. The
io::io_error
condition is completely removed and theread
andwrite
methods are altered to returnIoResult<T>
. This turned out to be an incredibly far-reaching change!Overall, I'm very happy with how this turned out (in addition with the
unused_must_use
lint). I had to almost rewrite the pretty printer inlibsyntax
as well as the the formatting inlibrustdoc
(as one would expect). These two modules do tons of I/O, and I believe that it's definitely improved.This pull request also introduces the
if_ok!()
macro for returning-early from something that returns a result. I made quite liberal use of this in mostly the pretty printer and html renderer, and I found its usage generally quite pleasant and convenient to have. I didn't really feel like adding any other macro while I was using it, and I figured that pretty printing could be nicer, but it's nowhere near horrid today.This may be a controversial issue closing, but I'm going to say it.
Closes #6163