-
Notifications
You must be signed in to change notification settings - Fork 243
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
Change all event and Attributes constructors to accept strings #428
Conversation
Approved: but please allow #425 to be merged first |
Actually, I would to merge #425 as late as possible, because I want to play with the possible improvements next week. I see that here we have a consensus, so it seems that this could be merged sooner |
I would prefer for it to be merged as soon as possible, for the same reason : / Everything which touches those files is effectively blocked on that PR, and the alternative is forcing 999eagle to rebase it over and over and over again, which doesn't feel like a great way to encourage further contributions. And they're not minor rebases but terribly painful ones. I hear your concerns over the duplication of code, but I see a clear path towards addressing it and I've already made a lot of progress. I kinda feel like we're just piling up more and more merge conflicts for no particularly good reason. |
Well, the crux of the issue is the file split (which makes practically every change a breaking one), and your namespace PR includes it, so for the sake of making at least some forwards progress on this issue, we can go with that one first.... |
…tead As a result, it became clear that the `test_read_write_roundtrip_escape` test did not check anything, so it was deleted
…caped` Writer is anywhere works only in UTF-8, so this constructor is not needed to be public
Writer is anywhere works only in UTF-8, so this constructor is not needed to be public
…ng instead of &[u8] / Vec<u8>
This PR is extended version of #424. It changes all events' constructors to accept
&str
/String
and removes all public constructors that accepts byte arrays. Internally these constructors are still used, so all tests still passed. On now we have our hands untied in changing the internal representation of events (well, almost,BytesStart::set_name
still accepts&[u8]
).I did not include name changes in this PR, because I want to make more radical renames instead of just removing
_str
suffix. I'll made corresponding PR tomorrow.