Skip to content

Commit

Permalink
lib: remove unused __empty special case in toLuaObject
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename committed May 18, 2024
1 parent 8aa3a23 commit af72dc1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
3 changes: 0 additions & 3 deletions lib/lua.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ in rec {
then
if isLuaInline args
then args.expr
# if nobody is using this we should get rid of this
else if hasAttr "__empty" args
then "{ }"
else
"{"
+ (concatStringsSep ","
Expand Down
7 changes: 1 addition & 6 deletions modules/wrapper/rc/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,11 @@
config = (attrs) the configuration options for this mapping (noremap, silent...)
}
*/
normalizeAction = action: let
normalizeAction = action: {
# Extract the values of the config options that have been explicitly set by the user
config =
filterAttrs (_: v: v != null)
(getAttrs (attrNames mapConfigOptions) action);
in {
config =
if config == {}
then {"__empty" = null;}
else config;
action =
if action.lua
then mkLuaInline action.action
Expand Down

0 comments on commit af72dc1

Please sign in to comment.