mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 15:24:48 +01:00
docs: fix example
This commit is contained in:
parent
0016283a2c
commit
3382ea72ea
1 changed files with 5 additions and 5 deletions
10
src/lib.rs
10
src/lib.rs
|
@ -62,13 +62,13 @@
|
||||||
//! let buffer = codemp.attach("test.txt").await?;
|
//! let buffer = codemp.attach("test.txt").await?;
|
||||||
//!
|
//!
|
||||||
//! // sending operation
|
//! // sending operation
|
||||||
//! if let Some(delta) = buffer.delta(0, "hello", 0) {
|
//! buffer.send(buffer.insert("hello", 0))?;
|
||||||
//! buffer.send(delta).expect("could not enqueue operation");
|
//!
|
||||||
|
//! if let Some(operation) = buffer.delta(4, "o world", 5) {
|
||||||
|
//! buffer.send(operation)?;
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
//! if let Some(delta) = buffer.delta(4, "o world", 5) {
|
//! assert_eq!(buffer.content(), "hello world");
|
||||||
//! buffer.send(delta).expect("could not enqueue operation");
|
|
||||||
//! }
|
|
||||||
//!
|
//!
|
||||||
//! Ok(())
|
//! Ok(())
|
||||||
//! }
|
//! }
|
||||||
|
|
Loading…
Reference in a new issue