mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-24 16:14:48 +01:00
test: fix doctest
This commit is contained in:
parent
d66b25deb4
commit
1f2c0708d6
1 changed files with 6 additions and 2 deletions
|
@ -69,8 +69,12 @@
|
|||
//! # use codemp::api::controller::{AsyncSender, AsyncReceiver};
|
||||
//! let buffer = workspace.attach("/some/file.txt").await.expect("failed to attach");
|
||||
//! buffer.content(); // force-sync
|
||||
//! if let Some(change) = buffer.try_recv().await.unwrap() {
|
||||
//! println!("content: {}, span: {}-{}", change.content, change.start, change.end);
|
||||
//! if let Some(mut delta) = buffer.try_recv().await.unwrap() {
|
||||
//! println!(
|
||||
//! "content: {}, span: {}-{}",
|
||||
//! delta.change.content, delta.change.start, delta.change.end
|
||||
//! );
|
||||
//! delta.ack();
|
||||
//! } // if None, no changes are currently available
|
||||
//! # };
|
||||
//! ```
|
||||
|
|
Loading…
Reference in a new issue