-
Notifications
You must be signed in to change notification settings - Fork 333
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
percent-encoding: Allow to remove character from AsciiSet #528
Conversation
182637a
to
0d33781
Compare
|
@SimonSapin for Yes, I'll bump version too UPD: To clarify, my use case is determining whether I should use |
Sorry, I still have a hard time seeing how calling What does |
filename referes to https://tools.ietf.org/html/rfc6266#section-4.3 If you're planning to encode file name in content-disposition header you should use different attribute instead of regular |
Simply making It looks like what you’re trying to do is find out whether |
Oh sorry that’s not accurate. That conversion can also return Would branching on |
@SimonSapin Yes, I'd need to check both for non-ASCII and for AsciiSet::contains. I guess if comparing output with input would be the only choice I'd go for it too, but it would require for me to percent ahead instead of doing it later. Nevertheless, if you feel like you don't want to expose this method, I can remove it from PR. |
@SimonSapin ping |
This would simplify the AttrCharEncodeSet in seanmonstar/reqwest#583 quite a bit, so I'm greatly in support of this landing as well. |
Looks good, thanks! @bors-servo r+ |
📌 Commit ed7b991 has been approved by |
percent-encoding: Allow to remove character from AsciiSet Allow to remove character from AsciiSet I liked trait approach better, but if you're going with something like AsciiSet it would be better to allow to remove bytes, as sometimes it is easier to take `NON_ALPHANUMERIC` and remove few necessary characters <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/528) <!-- Reviewable:end -->
☀️ Test successful - checks-travis |
Allow to remove character from AsciiSet
I liked trait approach better, but if you're going with something like AsciiSet it would be better to allow to remove bytes, as sometimes it is easier to take
NON_ALPHANUMERIC
and remove few necessary charactersThis change is