refactor: replaced loop for tbl_contains

This commit is contained in:
Alan 2021-11-05 16:39:13 +00:00
parent 2ed6b3e8ae
commit 0eced8969b

View File

@ -125,16 +125,14 @@ local function filter_filetype()
return return
end end
for filetype = 1, #excluded_filetypes do if vim.tbl_contains(excluded_filetypes, current_filetype) then
if current_filetype == excluded_filetypes[filetype] then log.error(
log.error( 'filter_filetype(): This filetype cannot be added or is included in the "excluded_filetypes" option'
'filter_filetype(): This filetype cannot be added or is included in the "excluded_filetypes" option' )
) error(
error( 'This filetype cannot be added or is included in the "excluded_filetypes" option'
'This filetype cannot be added or is included in the "excluded_filetypes" option' )
) return
return
end
end end
end end