From ce72ad3e027d6d9662c29134be7133e3f9e8eb9d Mon Sep 17 00:00:00 2001 From: alireza_sariri Date: Fri, 8 Nov 2024 11:25:19 +0330 Subject: [PATCH] run clippy in coulombs law --- src/electronics/coulombs_law.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/electronics/coulombs_law.rs b/src/electronics/coulombs_law.rs index fc8d9d70947..5704a0dbea3 100644 --- a/src/electronics/coulombs_law.rs +++ b/src/electronics/coulombs_law.rs @@ -50,12 +50,11 @@ pub fn coulombs_law( "charge2: {}", calculate_charge(charge1, force, distance) )); - } else { - return Ok(format!( - "distance: {}", - calculate_distance(charge_product, force) - )); } + Ok(format!( + "distance: {}", + calculate_distance(charge_product, force) + )) } fn calculate_distance(charge_product: f64, force: f64) -> f64 { (COULOMBS_CONSTANT * charge_product / force.abs()).sqrt()