Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ref: Use different error message for empty strings in schema processing #2151

Merged
merged 4 commits into from
May 24, 2023

Conversation

lforst
Copy link
Member

@lforst lforst commented May 24, 2023

Fixes #2137

@lforst lforst requested a review from a team May 24, 2023 08:35
Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment about test, other than that, LGTM!

#[test]
fn test_nonempty_string() {
assert_nonempty_base::<String>();
assert_nonempty_string::<String>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make assert_nonempty_base expect a &str with the expected error message instead of duplicating the function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feedback. Thanks! 29a689e

@lforst lforst merged commit be85634 into master May 24, 2023
@lforst lforst deleted the lforst-different-error-message branch May 24, 2023 13:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"expected a non-empty value" is a super ambiguous error message for empty strings
2 participants