Un-solve clippy1.rs

This commit is contained in:
Thomas Veness 2024-07-04 10:25:44 -04:00
parent 30d5b7db92
commit 10399c2238
No known key found for this signature in database

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;
let pi = 3.141592;
let radius: f32 = 5.0;
let area = pi * radius.powi(2);