examples: clippy

This commit is contained in:
Jonathan Kelley committed 2022-02-28 02:38:17 -05:00
1 parent 4954079212
commit 901bd5b0cd
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -146,7 +146,6 @@ fn app(cx: Scope) -> Element {
}
fn calc_val(val: String) -> f64 {
let mut result;
let mut temp = String::new();
let mut operation = "+".to_string();
@@ -169,7 +168,8 @@ fn calc_val(val: String) -> f64 {
temp_value.push(c);
start_index += 1;
}
result = temp_value.parse::<f64>().unwrap();
let mut result = temp_value.parse::<f64>().unwrap();
if start_index + 1 >= val.len() {
return result;