mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 07:14:50 +01:00
test: update doctests
This commit is contained in:
parent
b897b26bb9
commit
226a02f8f7
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@
|
||||||
//! # let client = codemp::Client::connect(codemp::api::Config::new("", "")).await.unwrap();
|
//! # let client = codemp::Client::connect(codemp::api::Config::new("", "")).await.unwrap();
|
||||||
//! # client.create_workspace("").await.unwrap();
|
//! # client.create_workspace("").await.unwrap();
|
||||||
//! # let workspace = client.join_workspace("").await.unwrap();
|
//! # let workspace = client.join_workspace("").await.unwrap();
|
||||||
//! use codemp::api::Controller; // needed to access trait methods
|
//! use codemp::api::controller::{AsyncSender, AsyncReceiver}; // needed to access trait methods
|
||||||
//! let cursor = workspace.cursor();
|
//! let cursor = workspace.cursor();
|
||||||
//! let event = cursor.recv().await.expect("disconnected while waiting for event!");
|
//! let event = cursor.recv().await.expect("disconnected while waiting for event!");
|
||||||
//! println!("user {} moved on buffer {}", event.user.unwrap_or_default(), event.buffer);
|
//! println!("user {} moved on buffer {}", event.user.unwrap_or_default(), event.buffer);
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
//! # let client = codemp::Client::connect(codemp::api::Config::new("", "")).await.unwrap();
|
//! # let client = codemp::Client::connect(codemp::api::Config::new("", "")).await.unwrap();
|
||||||
//! # client.create_workspace("").await.unwrap();
|
//! # client.create_workspace("").await.unwrap();
|
||||||
//! # let workspace = client.join_workspace("").await.unwrap();
|
//! # let workspace = client.join_workspace("").await.unwrap();
|
||||||
//! # use codemp::api::Controller;
|
//! # use codemp::api::controller::{AsyncSender, AsyncReceiver};
|
||||||
//! let buffer = workspace.attach("/some/file.txt").await.expect("failed to attach");
|
//! let buffer = workspace.attach("/some/file.txt").await.expect("failed to attach");
|
||||||
//! buffer.content(); // force-sync
|
//! buffer.content(); // force-sync
|
||||||
//! if let Some(change) = buffer.try_recv().await.unwrap() {
|
//! if let Some(change) = buffer.try_recv().await.unwrap() {
|
||||||
|
|
Loading…
Reference in a new issue