rustlings icon indicating copy to clipboard operation
rustlings copied to clipboard

Ambiguous question in exercises/quiz2.rs

Open dimitrijekostic opened this issue 3 years ago • 1 comments

Line 24 of exercises/quiz2.rs asks whether

string("nice weather".into()) or

string_slice("nice weather".into()) will compile. However both of these options compile. (The string_slice option is trivial, since "nice weather" is already of type &str.) I suspect this is an oversight, since there is a wrong answer for each of the nine other lines in the quiz.

dimitrijekostic avatar Apr 01 '21 02:04 dimitrijekostic

I thought this is a nice feature, it gives you one right answer for free. It made me lookup the into trait in std library.

fleetingbytes avatar Mar 05 '23 16:03 fleetingbytes