diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-10-16 17:03:48 +0100 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-10-17 16:53:52 +0100 |
commit | 3f3e4837d5f7d2d9cb1c89bd3a5b2ee8a730772a (patch) | |
tree | 54dc9c0e06c7436d18b1863e5b26272dc1948d78 /runtime/lua/vim/_system.lua | |
parent | fa6ab0d90958516d0bc1ed62839d85405ad08fa8 (diff) | |
download | rneovim-3f3e4837d5f7d2d9cb1c89bd3a5b2ee8a730772a.tar.gz rneovim-3f3e4837d5f7d2d9cb1c89bd3a5b2ee8a730772a.tar.bz2 rneovim-3f3e4837d5f7d2d9cb1c89bd3a5b2ee8a730772a.zip |
perf(validate): use lighter version
- Also fix `vim.validate()` for PUC Lua when showing errors for values
that aren't string or number.
Diffstat (limited to 'runtime/lua/vim/_system.lua')
-rw-r--r-- | runtime/lua/vim/_system.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/lua/vim/_system.lua b/runtime/lua/vim/_system.lua index d603971495..9e27b4c152 100644 --- a/runtime/lua/vim/_system.lua +++ b/runtime/lua/vim/_system.lua @@ -309,11 +309,9 @@ end --- @param on_exit? fun(out: vim.SystemCompleted) --- @return vim.SystemObj function M.run(cmd, opts, on_exit) - vim.validate({ - cmd = { cmd, 'table' }, - opts = { opts, 'table', true }, - on_exit = { on_exit, 'function', true }, - }) + vim.validate('cmd', cmd, 'table') + vim.validate('opts', opts, 'table', true) + vim.validate('on_exit', on_exit, 'function', true) opts = opts or {} |