Skip to content

Commit

Permalink
fix(nio/tasks): error formatting
Browse files Browse the repository at this point in the history
See #273
  • Loading branch information
rcarriga committed Jul 24, 2023
1 parent fb0b31a commit bec7be0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion lua/neotest/client/state/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ end
function NeotestClientState:update_results(adapter_id, results, partial)
logger.debug("New results for adapter", adapter_id)
logger.trace(results)
local positions = self:positions(adapter_id)
self._results[adapter_id] = vim.tbl_extend("force", self._results[adapter_id] or {}, results)
if not self._running[adapter_id] then
self._running[adapter_id] = {}
Expand Down
10 changes: 6 additions & 4 deletions lua/nio/tasks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ function nio.tasks.run(func, cb)
local _, nargs, err_or_fn = unpack(yielded)

if type(err_or_fn) ~= "function" then
error("Async internal error: expected function, got %s\nContext: %s\n%s"):format(
type(err_or_fn),
vim.inspect(yielded),
debug.traceback(co)
error(
("Async internal error: expected function, got %s\nContext: %s\n%s"):format(
type(err_or_fn),
vim.inspect(yielded),
debug.traceback(co)
)
)
end

Expand Down

0 comments on commit bec7be0

Please sign in to comment.