From fb8076dbf582235247b512566ba59cba1274073d Mon Sep 17 00:00:00 2001 From: cschen Date: Sat, 26 Oct 2024 19:13:37 +0200 Subject: [PATCH] fix: ack is not async. misnamed textchange fields. --- src/ffi/python/controllers.rs | 5 ++--- src/ffi/python/mod.rs | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ffi/python/controllers.rs b/src/ffi/python/controllers.rs index 50718af..334abdd 100644 --- a/src/ffi/python/controllers.rs +++ b/src/ffi/python/controllers.rs @@ -72,9 +72,8 @@ impl BufferController { } #[pyo3(name = "ack")] - fn pyack(&self, py: Python, v: Vec) -> PyResult<()> { - let this = self.clone(); - a_sync_allow_threads!(py, this.ack(v)) + fn pyack(&self, py: Python, v: Vec) -> () { + self.ack(v) } #[pyo3(name = "send")] diff --git a/src/ffi/python/mod.rs b/src/ffi/python/mod.rs index f9f8963..4e6ecd1 100644 --- a/src/ffi/python/mod.rs +++ b/src/ffi/python/mod.rs @@ -279,14 +279,14 @@ impl TextChange { ) -> PyResult { if let Some(kwds) = kwds { Ok(Self { - start_idx, - end_idx, + start_idx: start, + end_idx: end, content, }) } else { Ok(Self { - start_idx, - end_idx, + start_idx: start, + end_idx: end, content, }) }