mirror of https://github.com/rust-lang/async-book
update cargo new command with --lib
The current `cargo new timer_future` command generates `src/main.rs`, not `src/lib.rs` mentioned later.
This commit is contained in:
parent
66e6d20768
commit
8b518af9af
|
@ -23,7 +23,7 @@ For the sake of the example, we'll just spin up a new thread when the timer
|
|||
is created, sleep for the required time, and then signal the timer future
|
||||
when the time window has elapsed.
|
||||
|
||||
First, start a new project with `cargo new timer_future` and add the imports
|
||||
First, start a new project with `cargo new --lib timer_future` and add the imports
|
||||
we'll need to get started to `src/lib.rs`:
|
||||
|
||||
```rust
|
||||
|
|
Loading…
Reference in New Issue