We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0cd239 commit 021a11fCopy full SHA for 021a11f
exercises/decimal/Cargo-example.toml
@@ -4,6 +4,5 @@ name = "decimal"
4
version = "0.1.0"
5
6
[dependencies]
7
-try_opt = "0.1.1"
8
num-bigint = "0.1.40"
9
num-traits = "0.1.40"
exercises/decimal/example.rs
@@ -2,9 +2,6 @@ use std::cmp::Ordering;
2
use std::fmt;
3
use std::ops::{Add, Mul, Sub};
-#[macro_use]
-extern crate try_opt;
-
extern crate num_bigint;
use num_bigint::BigInt;
10
extern crate num_traits;
@@ -55,7 +52,7 @@ impl Decimal {
55
52
}
56
53
57
54
Some(Decimal::new(
58
- try_opt!(digits.parse::<BigInt>().ok()),
+ digits.parse().ok()?,
59
decimal_index.unwrap_or_default(),
60
))
61
0 commit comments