mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-06 01:53:30 +02:00
Clean up and unify exercises
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
// clippy1.rs
|
||||
//
|
||||
// The Clippy tool is a collection of lints to analyze your code so you can
|
||||
// catch common mistakes and improve your Rust code.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Execute `rustlings hint clippy1` or use the `hint` watch subcommand for a
|
||||
// hint.
|
||||
|
||||
use std::f32;
|
||||
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
// clippy2.rs
|
||||
//
|
||||
// Execute `rustlings hint clippy2` or use the `hint` watch subcommand for a
|
||||
// hint.
|
||||
|
||||
fn main() {
|
||||
let mut res = 42;
|
||||
let option = Some(12);
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
// clippy3.rs
|
||||
//
|
||||
// Here's a couple more easy Clippy fixes, so you can see its utility.
|
||||
// No hints.
|
||||
|
||||
#[allow(unused_variables, unused_assignments)]
|
||||
fn main() {
|
||||
|
||||
Reference in New Issue
Block a user