summaryrefslogtreecommitdiff
path: root/exercises/22_clippy
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-07-04 19:46:04 +0200
committermo8it <mo8it@proton.me>2024-07-04 19:46:43 +0200
commit0b220f9fffd02f77de1de79f510ae10c7c53b81f (patch)
tree3b730e57c7b2cf6cd297ee9b0fb7df2357f670d1 /exercises/22_clippy
parentd3cdeed8717668e54c9890f605082d2e8fb76376 (diff)
Fix clippy1
Diffstat (limited to 'exercises/22_clippy')
-rw-r--r--exercises/22_clippy/clippy1.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/exercises/22_clippy/clippy1.rs b/exercises/22_clippy/clippy1.rs
index b9d1ec1..7165da4 100644
--- a/exercises/22_clippy/clippy1.rs
+++ b/exercises/22_clippy/clippy1.rs
@@ -4,11 +4,9 @@
// For these exercises, the code will fail to compile when there are Clippy
// warnings. Check Clippy's suggestions from the output to solve the exercise.
-use std::f32::consts::PI;
-
fn main() {
- // Use the more accurate `PI` constant.
- let pi = PI;
+ // TODO: Fix the Clippy lint in this line.
+ let pi = 3.14;
let radius: f32 = 5.0;
let area = pi * radius.powi(2);