From 2b80f1836053dfbc8083697b809c608cb45c66e8 Mon Sep 17 00:00:00 2001 From: Oleksandr Smirnov Date: Wed, 26 Feb 2025 19:58:19 +0200 Subject: [PATCH] refactor: use table.concat instead of vim.fn.join --- lua/gopher/_utils/init.lua | 2 +- spec/testutils.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/gopher/_utils/init.lua b/lua/gopher/_utils/init.lua index 192a70c..0b54355 100644 --- a/lua/gopher/_utils/init.lua +++ b/lua/gopher/_utils/init.lua @@ -27,7 +27,7 @@ end ---@param path string ---@return string function utils.readfile_joined(path) - return vim.fn.join(vim.fn.readfile(path), "\n") + return table.concat(vim.fn.readfile(path), "\n") end return utils diff --git a/spec/testutils.lua b/spec/testutils.lua index e5ab9a2..04651d1 100644 --- a/spec/testutils.lua +++ b/spec/testutils.lua @@ -22,7 +22,7 @@ end ---@param path string ---@return string function testutils.readfile(path) - return vim.fn.join(vim.fn.readfile(path), "\n") + return table.concat(vim.fn.readfile(path), "\n") end ---@param fpath string