Fix clippy1

This commit is contained in:
mo8it
2024-07-04 19:46:43 +02:00
parent d3cdeed871
commit 0b220f9fff
+2 -4
View File
@@ -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);