StringEncodings.jl icon indicating copy to clipboard operation
StringEncodings.jl copied to clipboard

Inaccurate comment of flush

Open metab0t opened this issue 4 years ago • 1 comments

The comment says that flush returns the number of bytes written to output buffer, but it returns the encoder. Is the comment outdated?

https://github.com/JuliaStrings/StringEncodings.jl/blob/5ad92b78bfcee0bf488eee85dcac59ab24cbe76b/src/StringEncodings.jl#L219-L234

metab0t avatar Nov 19 '21 11:11 metab0t

Good catch. I've pushed a commit to remove that comment.

It would also make sense to return nothing rather than the stream, for consistency with what happens with IOStream in Base (though it's not documented). But changing this could break code that relies on it, so we'd better not do it until we tag a breaking release.

nalimilan avatar Nov 26 '21 21:11 nalimilan