fix: vim.tbl_flatten is deprecated

This commit is contained in:
Christian Clason 2024-04-22 19:27:12 +02:00
parent 5a38df5627
commit 054080bf59
2 changed files with 2 additions and 2 deletions

View file

@ -386,7 +386,7 @@ end
---@param compile_location string
---@return string? err
local function do_compile(logger, repo, cc, compile_location)
local args = vim.tbl_flatten(select_compiler_args(repo, cc))
local args = vim.iter(select_compiler_args(repo, cc)):flatten():totable()
local cmd = vim.list_extend({ cc }, args)
logger:info('Compiling parser')

View file

@ -183,7 +183,7 @@ function Runner:whole_file(dirs, opts)
assert.is.same(1, vim.fn.isdirectory(dir.filename))
return dir.filename
end, dirs)
local files = require('nvim-treesitter.compat').flatten(vim.tbl_map(scan_dir, dirs))
local files = vim.iter(vim.tbl_map(scan_dir, dirs)):flatten():totable()
for _, file in ipairs(files) do
local relpath = Path:new(file):make_relative(self.base_dir.filename)
self.it(relpath, function()