Kartheek is organizing Fix The Bug this year, and he needs to pick a day for the event. Given his
extreme indecisiveness, he instead decides to generate a random weekday to hold the event, using
the rand
and time
crates in Rust. But he's stuck with a compiler error. The compiler is telling
him that the Standard
trait is not implemented, even though it clearly is.
Can you help him fix the bug?
Note: The goal here is to figure out why the compiler is complaining, and fix it. Don't completely change the code to use a different method.
This repository contains a Rust project, so make sure you have rustc
and cargo
installed on your
machine. If you don't, you can install them using rustup, the official Rust
installer.
- Clone this repository and
cd
into it. - Run the program using
cargo run
.
How about we conduct Fix The Bug on Tuesday?
(Tuesday
is just an example, the output should be a random day of the week.)
No output, compiler error :(