From 0b220f9fffd02f77de1de79f510ae10c7c53b81f Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 4 Jul 2024 19:46:04 +0200 Subject: [PATCH] Fix clippy1 --- exercises/22_clippy/clippy1.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/exercises/22_clippy/clippy1.rs b/exercises/22_clippy/clippy1.rs index b9d1ec17..7165da45 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);