Skip to content
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

Relax loading XML values using FromValue #31

Merged
merged 1 commit into from
Jan 23, 2025
Merged

Conversation

einarmo
Copy link
Contributor

@einarmo einarmo commented Jan 22, 2025

All the ones we currently use it for implement Default, so we can just use unwrap_or_defualt. This handles the case of empty strings, and is probably fine for other types. It's a little weird for numbers, but 0 is a pretty reasonable way to interpret an empty tag.

All the ones we currently use it for implement Default, so we can just
use unwrap_or_defualt. This handles the case of empty strings, and is
probably fine for other types. It's a little weird for numbers, but 0 is
a pretty reasonable way to interpret an empty <Int></Int> tag.
@einarmo einarmo force-pushed the relax-from-value-load branch from abaa6cc to 0e00e1d Compare January 22, 2025 17:00
@einarmo einarmo merged commit 9790a36 into master Jan 23, 2025
6 checks passed
@einarmo einarmo deleted the relax-from-value-load branch January 23, 2025 07:02
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