Skip to content

Commit 6033ca8

Browse files
committed
perf: avoid redundant merge
1 parent e624273 commit 6033ca8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lua/wincent/commandt/init.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,13 @@ local options_spec = {
281281
end,
282282
}
283283

284-
-- Function that returns a copy of `options` with
285-
-- `always_show_dot_files = true` and `never_show_dot_files = false`.
284+
-- Sets `always_show_dot_files = true` and `never_show_dot_files = false` in
285+
-- `options` and returns the mutated table (`options` is a copy, so we're free
286+
-- to mutate it).
286287
local force_dot_files = function(options)
287-
return merge(options, {
288-
always_show_dot_files = true,
289-
never_show_dot_files = false,
290-
})
288+
options.always_show_dot_files = true
289+
options.never_show_dot_files = false
290+
return options
291291
end
292292

293293
local default_options = {

0 commit comments

Comments
 (0)