Skip to content

Commit

Permalink
fix doc test failure in custom_callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Jan 7, 2025
1 parent 80728dc commit 5907abf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions examples/rust/custom_callback/src/comms/viewer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,21 @@ use super::protocol::Message;
///
/// # Examples
/// ```
/// # use custom_callback::comms::viewer::ControlViewer;
/// # use custom_callback::comms::protocol::Message;
/// # async fn example() -> tokio::io::Result<()> {
/// let viewer = ControlViewer::connect("127.0.0.1:8080").await?;
/// let viewer = ControlViewer::connect("127.0.0.1:8080".to_owned()).await?;
/// let handle = viewer.handle();
///
/// // Spawn the main connection handling task
/// tokio::spawn(viewer.run());
///
/// // Send messages through the handle
/// handle.send(Message::Ping).unwrap();
/// handle.send(Message::Point3d {
/// path: "path".to_owned(),
/// position: (1.0, 2.0, 3.0),
/// radius: 1.0,
/// }).unwrap();
/// # Ok(())
/// # }
/// ```
Expand Down

0 comments on commit 5907abf

Please sign in to comment.