Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Show for types in std::io::{buffered,util}
A derived implementation would not be appropriate for the Buffered types since the buffer is both huge (64k by default) and full of uninitialized memory. Instead of printing the whole thing, we display how full it is. I also altered MultiWriter to make it generic over Writers instead of taking Box<Writer> trait objects. Box<Writer> implements Writer so existing use cases should continue to work, and this enables a more useful Show implementation in applicable cases. The change to MultiWriter may break code that uses it, but any fixes should be easy. [breaking-change]
- Loading branch information
Showing
2 changed files
with
46 additions
and
10 deletions.
There are no files selected for viewing
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
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
b4fae2f
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.
saw approval from alexcrichton
at sfackler@b4fae2f
b4fae2f
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.
merging sfackler/rust/show-impls = b4fae2f into auto
b4fae2f
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.
status: {"merge_sha": "3e22dfa2dc786f1fcbc8e0a72b1877fbeedc47b0"}
b4fae2f
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.
sfackler/rust/show-impls = b4fae2f merged ok, testing candidate = 3e22dfa2
b4fae2f
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.
saw approval from alexcrichton
at sfackler@b4fae2f
b4fae2f
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.
merging sfackler/rust/show-impls = b4fae2f into auto
b4fae2f
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.
status: {"merge_sha": "2e4cef4e78253beb4c08ed35416fad076d978344"}
b4fae2f
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.
sfackler/rust/show-impls = b4fae2f merged ok, testing candidate = 2e4cef4
b4fae2f
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.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/3107
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/3100
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/3101
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/3092
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/3092
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/3095
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/3088
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/3083
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/2760
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2758
success: http://buildbot.rust-lang.org/builders/auto-win-64-opt/builds/1596
success: http://buildbot.rust-lang.org/builders/auto-win-64-nopt-t/builds/1588
b4fae2f
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.
fast-forwarding master to auto = 2e4cef4
b4fae2f
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.
fast-forwarding master to auto = 2e4cef4