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

Implement TryFrom<&str> for Decimal #560

Merged
merged 1 commit into from
Dec 8, 2022
Merged

Conversation

c410-f3r
Copy link
Contributor

@c410-f3r c410-f3r commented Dec 5, 2022

Has the same implementation of FromStr for Decimal.

Advantageous because TryFrom is already included in the prelude meaning that no import is necessary.

use core::str::FromStr;
let _ = Decimal::from_str("1");
let _ = Decimal::try_from("1");

@paupino
Copy link
Owner

paupino commented Dec 8, 2022

Thank you for your help with this library @c410-f3r !

@paupino paupino merged commit 69c1e7f into paupino:master Dec 8, 2022
@c410-f3r
Copy link
Contributor Author

c410-f3r commented Dec 8, 2022

Thank you @paupino !

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.

None yet

2 participants