Skip to content

Commit 5e06627

Browse files
committed
style: fixed some selene errors/warnings
1 parent 44b6e54 commit 5e06627

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lua/lazy/core/plugin.lua

+2-5
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ function Spec:add(plugin, is_dep)
6767
local c = pkg:sub(1, 1)
6868
if c == "~" then
6969
plugin.uri = vim.loop.os_getenv("HOME") .. pkg:sub(2)
70-
elseif c == "/" then
71-
plugin.uri = pkg
72-
elseif pkg:sub(1, 4) == "http" or pkg:sub(1, 3) == "ssh" then
70+
elseif c == "/" or pkg:sub(1, 4) == "http" or pkg:sub(1, 3) == "ssh" then
7371
plugin.uri = pkg
7472
else
7573
plugin.uri = ("https://github.com/" .. pkg .. ".git")
@@ -202,8 +200,7 @@ function M.spec()
202200
local function _load(name, modpath)
203201
local modname = Config.options.plugins .. (name and ("." .. name) or "")
204202
Util.try(function()
205-
local mod = Module.load(modname, modpath)
206-
spec:normalize(assert(mod))
203+
spec:normalize(Module.load(modname, modpath))
207204
end, "Failed to load **" .. modname .. "**")
208205
end
209206

0 commit comments

Comments
 (0)