Skip to content

Commit 075d88f

Browse files
committed
fixup! feat(nextls): multi-root workspaces
1 parent a91ae53 commit 075d88f

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

lua/elixir/iter/init.lua

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,22 @@ end
8484
local packedmt = {}
8585

8686
local function unpack(t)
87-
if type(t) == 'table' and getmetatable(t) == packedmt then
87+
if type(t) == "table" and getmetatable(t) == packedmt then
8888
return _G.unpack(t, 1, t.n)
8989
end
9090
return t
9191
end
9292

9393
local function pack(...)
94-
local n = select('#', ...)
94+
local n = select("#", ...)
9595
if n > 1 then
9696
return setmetatable({ n = n, ... }, packedmt)
9797
end
9898
return ...
9999
end
100100

101101
local function sanitize(t)
102-
if type(t) == 'table' and getmetatable(t) == packedmt then
102+
if type(t) == "table" and getmetatable(t) == packedmt then
103103
-- Remove length tag
104104
t.n = nil
105105
end
@@ -448,7 +448,7 @@ end
448448
---
449449
---@return Iter
450450
function Iter.rev(self)
451-
error('rev() requires a list-like table')
451+
error("rev() requires a list-like table")
452452
return self
453453
end
454454

@@ -479,7 +479,7 @@ end
479479
---
480480
---@return any
481481
function Iter.peek(self) -- luacheck: no unused args
482-
error('peek() requires a list-like table')
482+
error("peek() requires a list-like table")
483483
end
484484

485485
---@private
@@ -513,7 +513,7 @@ end
513513
---
514514
---@return any
515515
function Iter.find(self, f)
516-
if type(f) ~= 'function' then
516+
if type(f) ~= "function" then
517517
local val = f
518518
f = function(v)
519519
return v == val
@@ -560,12 +560,12 @@ end
560560
---
561561
---@return any
562562
function Iter.rfind(self, f) -- luacheck: no unused args
563-
error('rfind() requires a list-like table')
563+
error("rfind() requires a list-like table")
564564
end
565565

566566
---@private
567567
function ListIter.rfind(self, f) -- luacheck: no unused args
568-
if type(f) ~= 'function' then
568+
if type(f) ~= "function" then
569569
local val = f
570570
f = function(v)
571571
return v == val
@@ -599,7 +599,7 @@ end
599599
---
600600
---@return any
601601
function Iter.nextback(self) -- luacheck: no unused args
602-
error('nextback() requires a list-like table')
602+
error("nextback() requires a list-like table")
603603
end
604604

605605
function ListIter.nextback(self)
@@ -628,7 +628,7 @@ end
628628
---
629629
---@return any
630630
function Iter.peekback(self) -- luacheck: no unused args
631-
error('peekback() requires a list-like table')
631+
error("peekback() requires a list-like table")
632632
end
633633

634634
function ListIter.peekback(self)
@@ -686,7 +686,7 @@ end
686686
---@param n number Number of values to skip.
687687
---@return Iter
688688
function Iter.skipback(self, n) -- luacheck: no unused args
689-
error('skipback() requires a list-like table')
689+
error("skipback() requires a list-like table")
690690
return self
691691
end
692692

@@ -760,7 +760,7 @@ end
760760
---@param last number
761761
---@return Iter
762762
function Iter.slice(self, first, last) -- luacheck: no unused args
763-
error('slice() requires a list-like table')
763+
error("slice() requires a list-like table")
764764
return self
765765
end
766766

@@ -909,9 +909,9 @@ end
909909
---@private
910910
function Iter.new(src, ...)
911911
local it = {}
912-
if type(src) == 'table' then
912+
if type(src) == "table" then
913913
local mt = getmetatable(src)
914-
if mt and type(mt.__call) == 'function' then
914+
if mt and type(mt.__call) == "function" then
915915
---@private
916916
function it.next()
917917
return src()
@@ -937,7 +937,7 @@ function Iter.new(src, ...)
937937
return ListIter.new(t)
938938
end
939939

940-
if type(src) == 'function' then
940+
if type(src) == "function" then
941941
local s, var = ...
942942

943943
--- Use a closure to handle var args returned from iterator
@@ -957,7 +957,7 @@ function Iter.new(src, ...)
957957

958958
setmetatable(it, Iter)
959959
else
960-
error('src must be a table or function')
960+
error("src must be a table or function")
961961
end
962962
return it
963963
end

0 commit comments

Comments
 (0)