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

Fix parse error in formatter example #1842

Merged
merged 1 commit into from
Jul 1, 2021
Merged

Fix parse error in formatter example #1842

merged 1 commit into from
Jul 1, 2021

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Jun 30, 2021

@@ -173,7 +174,7 @@ impl Formatter<f64> for NaiveCurrencyFormatter {
let bad_char = if c1.is_ascii_digit() { other } else { c1 };
Validation::failure(CurrencyValidationError::InvalidChar(bad_char))
}
_ => unreachable!(),
other => panic!("unexpected: {:?}", other),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why other vs _? Just curious.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just so that I had a simple binding I could print to see what the failure was. Probably don't need to commit, but seems more useful anyway..

Copy link
Contributor

Choose a reason for hiding this comment

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

ohh haha I see now, I didnt notice you use it too.

Copy link
Contributor

@JAicewizard JAicewizard left a comment

Choose a reason for hiding this comment

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

Looks good.
Not sure if I'm allowed to approve, but I'm doing it anyways!

Copy link
Collaborator

@maan2003 maan2003 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@cmyr cmyr merged commit 32ebae1 into master Jul 1, 2021
@cmyr cmyr deleted the fix-formatter-example branch June 20, 2022 13:45
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.

value formatter panic when entering 24,- as euro amount.
3 participants