From 87d6654a9f5b636dbd1876018075166478d85f10 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sat, 1 Jun 2024 15:08:05 +0100 Subject: [PATCH] lib/options: remove `mkStr` assert If a non-string is passed in, it'll be formatted here. This is okay because `mkDesc` will not re-format anyway. --- lib/options.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/options.nix b/lib/options.nix index 6e8d5cd9..dffa7f3b 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -168,9 +168,7 @@ rec { mkStr = # TODO we should delegate rendering quoted string to `mkDefaultDesc`, # once we remove its special case for strings. - default: - assert default == null || isString default; - mkNullableWithRaw types.str (generators.toPretty { } default); + default: mkNullableWithRaw types.str (generators.toPretty { } default); mkAttributeSet' = args: mkNullable' (args // { type = nixvimTypes.attrs; }); mkAttributeSet = default: description: mkAttributeSet' { inherit default description; };