We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3cdeed commit 0b220f9Copy full SHA for 0b220f9
exercises/22_clippy/clippy1.rs
@@ -4,11 +4,9 @@
4
// For these exercises, the code will fail to compile when there are Clippy
5
// warnings. Check Clippy's suggestions from the output to solve the exercise.
6
7
-use std::f32::consts::PI;
8
-
9
fn main() {
10
- // Use the more accurate `PI` constant.
11
- let pi = PI;
+ // TODO: Fix the Clippy lint in this line.
+ let pi = 3.14;
12
let radius: f32 = 5.0;
13
14
let area = pi * radius.powi(2);
0 commit comments