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
Rustlings 🦀
Small exercises to get you used to reading and writing Rust code - Recommended in parallel to reading the official Rust book 📚️
Visit the website for a demo, info about setup and more:
➡️ rustlings.rust-lang.org ⬅️
Languages
Rust
97.7%
HTML
1.9%
CSS
0.3%