From af72dc105d9aaef1d20e1dc36e6add4d18c60951 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 18 May 2024 14:52:40 +0200 Subject: [PATCH] lib: remove unused __empty special case in toLuaObject --- lib/lua.nix | 3 --- modules/wrapper/rc/config.nix | 7 +------ 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/lua.nix b/lib/lua.nix index 8cef5d5..e871317 100644 --- a/lib/lua.nix +++ b/lib/lua.nix @@ -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 "," diff --git a/modules/wrapper/rc/config.nix b/modules/wrapper/rc/config.nix index b50531b..c278562 100644 --- a/modules/wrapper/rc/config.nix +++ b/modules/wrapper/rc/config.nix @@ -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