From 6365466b189ef9e9f7257ecaefd5ef7643b58ba1 Mon Sep 17 00:00:00 2001 From: Hunter Kvalevog Date: Fri, 2 Oct 2026 21:53:51 -0500 Subject: --- rust/rustlings/exercises/22_clippy/clippy2.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 rust/rustlings/exercises/22_clippy/clippy2.rs (limited to 'rust/rustlings/exercises/22_clippy/clippy2.rs') diff --git a/rust/rustlings/exercises/22_clippy/clippy2.rs b/rust/rustlings/exercises/22_clippy/clippy2.rs new file mode 100644 index 0000000..8cfe6f8 --- /dev/null +++ b/rust/rustlings/exercises/22_clippy/clippy2.rs @@ -0,0 +1,10 @@ +fn main() { + let mut res = 42; + let option = Some(12); + // TODO: Fix the Clippy lint. + for x in option { + res += x; + } + + println!("{res}"); +} -- cgit v1.2.3