fixed doc tests
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
//! # Basic example
|
||||
//!
|
||||
//! ```no_run
|
||||
//! use nym_sdk::mixnet;
|
||||
//! use nym_sdk::mixnet::{self, MixnetMessageSender};
|
||||
//!
|
||||
//! #[tokio::main]
|
||||
//! async fn main() {
|
||||
@@ -27,7 +27,7 @@
|
||||
//! let our_address = client.nym_address();
|
||||
//!
|
||||
//! // Send a message throughout the mixnet to ourselves
|
||||
//! client.send_str(*our_address, "hello there").await;
|
||||
//! client.send_plain_message(*our_address, "hello there").await.unwrap();
|
||||
//!
|
||||
//! println!("Waiting for message");
|
||||
//! if let Some(received) = client.wait_for_messages().await {
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
//! # Basic example
|
||||
//!
|
||||
//! ```no_run
|
||||
//! use nym_sdk::mixnet;
|
||||
//! use nym_sdk::mixnet::{self, MixnetMessageSender};
|
||||
//!
|
||||
//! #[tokio::main]
|
||||
//! async fn main() {
|
||||
//! // Passing no config makes the client fire up an ephemeral session and figure stuff out on
|
||||
//! // its own
|
||||
//! let mut client = mixnet::MixnetClient::connect_new().await.unwrap();
|
||||
//! let mut client = mixnet::MixnetClient::connect_new().await.unwrap();
|
||||
//!
|
||||
//! // Be able to get our client address
|
||||
//! let our_address = client.nym_address();
|
||||
//! println!("Our client nym address is: {our_address}");
|
||||
//!
|
||||
//! // Send a message throught the mixnet to ourselves
|
||||
//! client.send_str(*our_address, "hello there").await;
|
||||
//! client.send_plain_message(*our_address, "hello there").await.unwrap();
|
||||
//!
|
||||
//! println!("Waiting for message");
|
||||
//! if let Some(received) = client.wait_for_messages().await {
|
||||
|
||||
Reference in New Issue
Block a user