From 8d0e80eeee116d92addda709b94d3c76823d0bd6 Mon Sep 17 00:00:00 2001 From: Lukas Reineke Date: Tue, 19 Dec 2023 18:51:21 +0900 Subject: [PATCH] refactor: change tbl_contains to direct check --- lua/ibl/indent.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lua/ibl/indent.lua b/lua/ibl/indent.lua index 25d56cc3..c3a652a7 100644 --- a/lua/ibl/indent.lua +++ b/lua/ibl/indent.lua @@ -105,17 +105,16 @@ end --- ---@param whitespace ibl.indent.whitespace M.is_indent = function(whitespace) - return utils.tbl_contains( - { M.whitespace.INDENT, M.whitespace.TAB_START, M.whitespace.TAB_START_SINGLE }, - whitespace - ) + return whitespace == M.whitespace.INDENT + or whitespace == M.whitespace.TAB_START + or whitespace == M.whitespace.TAB_START_SINGLE end --- Returns true if the passed whitespace belongs to space indent --- ---@param whitespace ibl.indent.whitespace M.is_space_indent = function(whitespace) - return utils.tbl_contains({ M.whitespace.INDENT, M.whitespace.SPACE }, whitespace) + return whitespace == M.whitespace.INDENT or whitespace == M.whitespace.SPACE end return M