From 1e2fd9c92f8cd6e389525ca1a999fca4c90b5921 Mon Sep 17 00:00:00 2001 From: Mario Reder Date: Fri, 14 Feb 2020 15:25:03 +0100 Subject: feat: Add clippy lints - adds a new 'clippy' category for exercises - clippy exercises should throw no warnings - install script now also installs clippy is related to https://github.com/rust-lang/rust-clippy/issues/2604 --- exercises/clippy/clippy2.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 exercises/clippy/clippy2.rs (limited to 'exercises/clippy/clippy2.rs') diff --git a/exercises/clippy/clippy2.rs b/exercises/clippy/clippy2.rs new file mode 100644 index 0000000..37af9ed --- /dev/null +++ b/exercises/clippy/clippy2.rs @@ -0,0 +1,13 @@ +// clippy2.rs +// Make me compile! Execute `rustlings hint clippy2` for hints :) + +// I AM NOT DONE + +fn main() { + let mut res = 42; + let option = Some(12); + for x in option { + res += x; + } + println!("{}", res); +} -- cgit v1.2.3