Skip to content

Commit 332db69

Browse files
committed
Fix clippy warnings in examples
1 parent 66e97b7 commit 332db69

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/floating-precision.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use bigdecimal::BigDecimal;
44
use std::str::FromStr;
55

66
fn main() {
7-
let input = std::env::args().skip(1).next().unwrap_or("0.7".to_string());
7+
let input = std::env::args().nth(1).unwrap_or("0.7".to_string());
88
let decimal = BigDecimal::from_str(&input).expect("invalid decimal");
99
let floating = f32::from_str(&input).expect("invalid float");
1010

examples/simple-math.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ sum mut: 48.00000000000000
2121
fn main() {
2222
println!("Hello, Big Decimals!");
2323
let input = "0.8";
24-
let dec = BigDecimal::from_str(&input).unwrap();
25-
let float = f32::from_str(&input).unwrap();
24+
let dec = BigDecimal::from_str(input).unwrap();
25+
let float = f32::from_str(input).unwrap();
2626
println!("Input ({}) with 10 decimals: {} vs {})", input, dec, float);
2727

2828
let bd_square = dec.square();

0 commit comments

Comments
 (0)