You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's more idiomatic and expressive to impl FromStr for Decimal instead of using a custom parse method. This is very slightly harder for the students, but it makes usage much nicer:
- let decimal = Decimal.try_from("123.45")?;+ let decimal: Decimal = "123.45".parse()?;
The text was updated successfully, but these errors were encountered:
rust/exercises/decimal/example.rs
Line 30 in 9ad579f
It's more idiomatic and expressive to
impl FromStr for Decimal
instead of using a custom parse method. This is very slightly harder for the students, but it makes usage much nicer:The text was updated successfully, but these errors were encountered: