diff --git a/src/api/change.rs b/src/api/change.rs index b52cc5c..60d28f2 100644 --- a/src/api/change.rs +++ b/src/api/change.rs @@ -31,18 +31,18 @@ pub struct BufferUpdate { /// ### Examples /// To insert 'a' after 4th character we should send: /// ``` -/// codemp::api::TextChange { start: 4, end: 4, content: "a".into() }; +/// codemp::api::TextChange { start_idx: 4, end_idx: 4, content: "a".into() }; /// ``` /// /// To delete the fourth character we should send: /// ``` -/// codemp::api::TextChange { start: 3, end: 4, content: "".into() }; +/// codemp::api::TextChange { start_idx: 3, end_idx: 4, content: "".into() }; /// ``` /// /// ``` /// let change = codemp::api::TextChange { -/// start: 6, -/// end: 11, +/// start_idx: 6, +/// end_idx: 11, /// content: "mom".to_string() /// }; /// let before = "hello world!"; diff --git a/src/lib.rs b/src/lib.rs index 304e7c5..3179b7f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -72,7 +72,7 @@ //! if let Some(mut update) = buffer.try_recv().await.unwrap() { //! println!( //! "content: {}, span: {}-{}", -//! update.change.content, update.change.start, update.change.end +//! update.change.content, update.change.start_idx, update.change.end_idx //! ); //! buffer.ack(update.version); //! } // if None, no changes are currently available