diff options
author | dundargoc <gocdundar@gmail.com> | 2023-12-13 14:04:24 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-12-30 17:40:53 +0100 |
commit | d51b6157473c4830313b566116aa3ad38dc97412 (patch) | |
tree | 28092346ddec03f9cb7d924313c991ca2e1077d6 /runtime/lua/vim/iter.lua | |
parent | bf0be0f63e7142675f1376781c128116d12c520d (diff) | |
download | rneovim-d51b6157473c4830313b566116aa3ad38dc97412.tar.gz rneovim-d51b6157473c4830313b566116aa3ad38dc97412.tar.bz2 rneovim-d51b6157473c4830313b566116aa3ad38dc97412.zip |
refactor: fix luals warnings
Diffstat (limited to 'runtime/lua/vim/iter.lua')
-rw-r--r-- | runtime/lua/vim/iter.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/lua/vim/iter.lua b/runtime/lua/vim/iter.lua index 8e602c406a..b658dde099 100644 --- a/runtime/lua/vim/iter.lua +++ b/runtime/lua/vim/iter.lua @@ -432,6 +432,7 @@ end --- ``` --- ---@return any +---@diagnostic disable-next-line: unused-local function Iter.next(self) -- luacheck: no unused args -- This function is provided by the source iterator in Iter.new. This definition exists only for -- the docstring @@ -489,6 +490,7 @@ end --- ``` --- ---@return any +---@diagnostic disable-next-line: unused-local function Iter.peek(self) -- luacheck: no unused args error('peek() requires a list-like table') end @@ -568,12 +570,13 @@ end ---@see Iter.find --- ---@return any +---@diagnostic disable-next-line: unused-local function Iter.rfind(self, f) -- luacheck: no unused args error('rfind() requires a list-like table') end ---@private -function ListIter.rfind(self, f) -- luacheck: no unused args +function ListIter.rfind(self, f) if type(f) ~= 'function' then local val = f f = function(v) @@ -640,6 +643,7 @@ end --- ``` --- ---@return any +---@diagnostic disable-next-line: unused-local function Iter.nextback(self) -- luacheck: no unused args error('nextback() requires a list-like table') end @@ -669,6 +673,7 @@ end --- ``` --- ---@return any +---@diagnostic disable-next-line: unused-local function Iter.peekback(self) -- luacheck: no unused args error('peekback() requires a list-like table') end @@ -725,6 +730,7 @@ end --- ---@param n number Number of values to skip. ---@return Iter +---@diagnostic disable-next-line: unused-local function Iter.skipback(self, n) -- luacheck: no unused args error('skipback() requires a list-like table') return self @@ -791,6 +797,7 @@ end ---@param first number ---@param last number ---@return Iter +---@diagnostic disable-next-line: unused-local function Iter.slice(self, first, last) -- luacheck: no unused args error('slice() requires a list-like table') return self |