mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-08-14 14:26:56 +00:00
dev-check runs clippy with -D warnings against the solutions, which
flagged the nested if let Some(dir_path) = ... { if dir_path.exists() ... }
in file_cleanup as collapsible. Combined into a single if-let with a
let-chain condition (edition = "2024", so this is available).
Verified locally: compiles under --edition 2024, clippy is silent,
and the binary still runs cleanly with file size 117 and no leftover
files.
Official Rustlings solutions
Before you finish an exercise, its solution file will only contain an empty main function.
The content of this file will be automatically replaced by the actual solution once you finish the exercise.
Note that these solutions are often only one possibility to solve an exercise.