refactor: use table.concat instead of vim.fn.join
This commit is contained in:
parent
1592502a94
commit
2b80f18360
2 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ end
|
||||||
---@param path string
|
---@param path string
|
||||||
---@return string
|
---@return string
|
||||||
function utils.readfile_joined(path)
|
function utils.readfile_joined(path)
|
||||||
return vim.fn.join(vim.fn.readfile(path), "\n")
|
return table.concat(vim.fn.readfile(path), "\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
return utils
|
return utils
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ end
|
||||||
---@param path string
|
---@param path string
|
||||||
---@return string
|
---@return string
|
||||||
function testutils.readfile(path)
|
function testutils.readfile(path)
|
||||||
return vim.fn.join(vim.fn.readfile(path), "\n")
|
return table.concat(vim.fn.readfile(path), "\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param fpath string
|
---@param fpath string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue