mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-06-30 00:08:45 +00:00
The `"nice weather".into()` line could be solved with either `string_slice` or `string`. The `string_slice` choice compiled and passed the exercise while emitting a `clippy::useless_conversion` warning, so the exercise could pass with a warning still present. Understanding why `.into()` works for both targets requires the `From` trait, which rustlings introduces later. Remove the example from the exercise and solution. Fixes #2190
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.