Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a `write_char` method to `std::fmt::Write` #24661
Conversation
rust-highfive
assigned
alexcrichton
Apr 21, 2015
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
This comment has been minimized.
This comment has been minimized.
|
I'm fine with this coming in as That said, I don't think we'll cherry-pick this for 1.0, so can you please put |
This comment has been minimized.
This comment has been minimized.
|
Done. Is it still |
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ |
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this pull request
Apr 21, 2015
This comment has been minimized.
This comment has been minimized.
|
No tests? :( |
This comment has been minimized.
This comment has been minimized.
ncm
commented
Apr 22, 2015
|
I am kind of out of the loop, here. Is Rust perpetuating C's confusion of octets with characters? Or does write_char write out enough octets to form a code point (which we can, informally, call a character because it's close enough for most purposes)? If it just writes a byte, that seems like a worthy goal, but then the name is wrong. |
This comment has been minimized.
This comment has been minimized.
|
@ncm: I don’t think there is such a confusion. A My goal here is to use this trait not just for formatting, but as a general-purpose Unicode-based stream. The default implementation of |
SimonSapin commentedApr 21, 2015
as accepted in RFC 526.
Note that this brand new method is marked as stable. I judged this safe enough: it’s simple enough that it’s very unlikely to change. Still, I can mark it unstable instead if you prefer.
r? @alexcrichton