-
Notifications
You must be signed in to change notification settings - Fork 42
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
Allow empty strings in <text>
and <type>
of <link>
#93
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lnicola
approved these changes
Aug 23, 2023
Thanks for the review @lnicola :-) |
bors r+ |
bors bot
added a commit
that referenced
this pull request
Aug 29, 2023
93: Allow empty strings in `<text>` and `<type>` of `<link>` r=lnicola a=w-flo - [X] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [X] I added an entry to `CHANGELOG.md` if knowledge of this change could be valuable to users. --- I've sneaked in a second commit in this PR, to add a changelog entry for my previous PR that was merged without a changelog entry. After looking at the changelog, it seems like my previous decision to skip adding an entry was incorrect (the change probably was more important for users than CI rust version bumps). Open question for this change: Should `<text></text>` result in `text = Some("")` or `text = None`? I like the current `Some("")` approach since I suspect some applications use this crate to read, change and then write GPX files. If `Some("")` was changed to `None` through some magic, the resulting GPX file would have the `<text></text>` removed. There would also be some (arguably mostly irrelevant) loss of information ("is there an empty text tag or no text tag?") when reading a GPX file. However, changing it to `None` might be helpful for applications since most would probably want to treat an emptry string the same as no string. I'd be fine with both approaches. Co-authored-by: Florian Will <florian.will@gmail.com>
Build failed: |
The GPX schema just says these are optional `xsd:string` elements, and apparently the empty string is perfectly legal here. Fixes georust#92
I've noticed the file is basically just a list of PRs that were merged with the "knowledge of the change is valuable to users" threshold being quite low. So I changed my decision from last time and added the PR. :-)
a851f1e
to
63cd36a
Compare
Thanks for the MSRV bump! I rebased this PR just now |
Thanks! bors r+ |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CHANGELOG.md
if knowledge of this change could be valuable to users.I've sneaked in a second commit in this PR, to add a changelog entry for my previous PR that was merged without a changelog entry. After looking at the changelog, it seems like my previous decision to skip adding an entry was incorrect (the change probably was more important for users than CI rust version bumps).
Open question for this change: Should
<text></text>
result intext = Some("")
ortext = None
? I like the currentSome("")
approach since I suspect some applications use this crate to read, change and then write GPX files. IfSome("")
was changed toNone
through some magic, the resulting GPX file would have the<text></text>
removed. There would also be some (arguably mostly irrelevant) loss of information ("is there an empty text tag or no text tag?") when reading a GPX file. However, changing it toNone
might be helpful for applications since most would probably want to treat an emptry string the same as no string. I'd be fine with both approaches.