chore: lua annotations, cargo fmt

This commit is contained in:
əlemi 2024-10-27 19:42:14 +01:00
parent 2ecf8e3b3f
commit 1039168789
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 2 additions and 9 deletions

View file

@ -377,9 +377,6 @@ local BufferUpdate = {}
function TextChange:apply(other) end function TextChange:apply(other) end
---@param change TextChange text change to broadcast ---@param change TextChange text change to broadcast
---@return NilPromise
---@async
---@nodiscard
---update buffer with a text change; note that to delete content should be empty but not span, while to insert span should be empty but not content (can insert and delete at the same time) ---update buffer with a text change; note that to delete content should be empty but not span, while to insert span should be empty but not content (can insert and delete at the same time)
function BufferController:send(change) end function BufferController:send(change) end
@ -438,9 +435,6 @@ local CursorController = {}
---@field sel Selection selected region for this user ---@field sel Selection selected region for this user
---@param cursor Selection cursor position to broadcast ---@param cursor Selection cursor position to broadcast
---@return NilPromise
---@async
---@nodiscard
---update cursor position by sending a cursor event to server ---update cursor position by sending a cursor event to server
function CursorController:send(cursor) end function CursorController:send(cursor) end

View file

@ -33,11 +33,10 @@ impl BufferController {
/// Acknowledge TextChange /// Acknowledge TextChange
#[napi(js_name = "ack")] #[napi(js_name = "ack")]
pub fn js_ack(&self, version: Vec<i64>){ pub fn js_ack(&self, version: Vec<i64>) {
self.ack(version); self.ack(version);
} }
/// Remove registered buffer callback /// Remove registered buffer callback
#[napi(js_name = "clearCallback")] #[napi(js_name = "clearCallback")]
pub fn js_clear_callback(&self) { pub fn js_clear_callback(&self) {