fixed doc tests

This commit is contained in:
Jędrzej Stuczyński
2023-08-09 14:49:16 +01:00
parent b63f5409db
commit 75bb9140b0
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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 {
+3 -3
View File
@@ -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 {