Skip to content

Commit ce72ad3

Browse files
run clippy in coulombs law
1 parent f907fea commit ce72ad3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/electronics/coulombs_law.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,11 @@ pub fn coulombs_law(
5050
"charge2: {}",
5151
calculate_charge(charge1, force, distance)
5252
));
53-
} else {
54-
return Ok(format!(
55-
"distance: {}",
56-
calculate_distance(charge_product, force)
57-
));
5853
}
54+
Ok(format!(
55+
"distance: {}",
56+
calculate_distance(charge_product, force)
57+
))
5958
}
6059
fn calculate_distance(charge_product: f64, force: f64) -> f64 {
6160
(COULOMBS_CONSTANT * charge_product / force.abs()).sqrt()

0 commit comments

Comments
 (0)