*: Updated comments in examples (#2985)

This commit is contained in:
Hannes
2022-10-05 19:49:03 +02:00
committed by GitHub
parent bdf9209824
commit 33b5c05529
5 changed files with 9 additions and 17 deletions

View File

@ -25,15 +25,7 @@
//! The example is run per node as follows:
//!
//! ```sh
//! cargo run --example chat-tokio --features="tcp-tokio mdns-tokio"
//! ```
//!
//! Alternatively, to run with the minimal set of features and crates:
//!
//! ```sh
//!cargo run --example chat-tokio \\
//! --no-default-features \\
//! --features="floodsub mplex noise tcp-tokio mdns-tokio"
//! cargo run --example chat-tokio --features=full
//! ```
use futures::StreamExt;

View File

@ -35,7 +35,7 @@
//! terminal window, run:
//!
//! ```sh
//! cargo run --example chat
//! cargo run --example chat --features=full
//! ```
//!
//! It will print the PeerId and the listening addresses, e.g. `Listening on
@ -44,7 +44,7 @@
//! In the second terminal window, start a new instance of the example with:
//!
//! ```sh
//! cargo run --example chat -- /ip4/127.0.0.1/tcp/24915
//! cargo run --example chat --features=full -- /ip4/127.0.0.1/tcp/24915
//! ```
//!
//! The two nodes then connect.

View File

@ -57,7 +57,7 @@
//! 1. Run command below in one terminal.
//!
//! ```
//! cargo run --example file-sharing -- \
//! cargo run --example file-sharing --features=full -- \
//! --listen-address /ip4/127.0.0.1/tcp/40837 \
//! --secret-key-seed 1 \
//! provide \
@ -68,7 +68,7 @@
//! 2. Run command below in another terminal.
//!
//! ```
//! cargo run --example file-sharing -- \
//! cargo run --example file-sharing --features=full -- \
//! --peer /ip4/127.0.0.1/tcp/40837/p2p/12D3KooWPjceQrSwdWXPyLLeABRXmuqt69Rg3sBYbU1Nft9HyQ6X \
//! get \
//! --name <name-for-others-to-find-your-file>

View File

@ -32,7 +32,7 @@
//! terminal window, run:
//!
//! ```sh
//! cargo run --example gossipsub-chat
//! cargo run --example gossipsub-chat --features=full
//! ```
//!
//! It will print the [`PeerId`] and the listening addresses, e.g. `Listening on
@ -41,7 +41,7 @@
//! In the second terminal window, start a new instance of the example with:
//!
//! ```sh
//! cargo run --example gossipsub-chat -- /ip4/127.0.0.1/tcp/24915
//! cargo run --example gossipsub-chat --features=full -- /ip4/127.0.0.1/tcp/24915
//! ```
//!
//! The two nodes should then connect.

View File

@ -25,7 +25,7 @@
//! In the first terminal window, run:
//!
//! ```sh
//! cargo run --example ping
//! cargo run --example ping --features=full
//! ```
//!
//! It will print the PeerId and the listening addresses, e.g. `Listening on
@ -34,7 +34,7 @@
//! In the second terminal window, start a new instance of the example with:
//!
//! ```sh
//! cargo run --example ping -- /ip4/127.0.0.1/tcp/24915
//! cargo run --example ping --features=full -- /ip4/127.0.0.1/tcp/24915
//! ```
//!
//! The two nodes establish a connection, negotiate the ping protocol