Skip to content

Rework UTF-8 writing#277

Open
rkuklik wants to merge 2 commits intomarshallpierce:masterfrom
rkuklik:master
Open

Rework UTF-8 writing#277
rkuklik wants to merge 2 commits intomarshallpierce:masterfrom
rkuklik:master

Conversation

@rkuklik
Copy link

@rkuklik rkuklik commented Nov 22, 2024

See #275.

This needs more polish, mainly around docs and naming things. Also, the into_inner method is inconsistent with previous implementation, so it should either be removed or adjusted.

/// Returns the base64-encoded form of the accumulated written data.
pub fn formatter(mut self) -> W {
self.finish()
.expect("Writing to a consumer should never fail")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what's not going to work for me. We should not assume that this will always succeed. Anyone is free to implement Write and take the contract at its word that write_str can fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants