Addes documentation to examples (#348)

This commit is contained in:
Timon 2019-12-16 10:13:35 -06:00 committed by GitHub
parent 68389ac5b4
commit b3cf303295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 2 deletions

View File

@ -24,6 +24,8 @@ The examples are compatible with the latest release.
$ cargo run --example [file name] $ cargo run --example [file name]
``` ```
To run the interactive-demo go into the folder `examples/interactive-demo` and run `cargo run`.
## License ## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details. This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details.

View File

@ -1,6 +1,6 @@
//! Demonstrates how to read events asynchronously with async-std. //! Demonstrates how to read events asynchronously with async-std.
//! //!
//! cargo run --example event-read-char-line //! cargo run --features="event-stream" --example event-stream-async-std
use std::{ use std::{
io::{stdout, Write}, io::{stdout, Write},

View File

@ -1,6 +1,6 @@
//! Demonstrates how to read events asynchronously with tokio. //! Demonstrates how to read events asynchronously with tokio.
//! //!
//! cargo run --features event-stream --example event-stream-tokio //! cargo run --features="event-stream" --example event-stream-tokio
use std::{ use std::{
io::{stdout, Write}, io::{stdout, Write},

View File

@ -5,6 +5,8 @@
//! //!
//! This particular example is only suited to Unix //! This particular example is only suited to Unix
//! for now. //! for now.
//!
//! cargo run --example stderr
use std::io::{stderr, Write}; use std::io::{stderr, Write};