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.
This commit is contained in:
Matt Sturgeon 2024-06-01 15:08:05 +01:00
parent 297aa6d0a2
commit 87d6654a9f
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -168,9 +168,7 @@ rec {
mkStr = mkStr =
# TODO we should delegate rendering quoted string to `mkDefaultDesc`, # TODO we should delegate rendering quoted string to `mkDefaultDesc`,
# once we remove its special case for strings. # once we remove its special case for strings.
default: default: mkNullableWithRaw types.str (generators.toPretty { } default);
assert default == null || isString default;
mkNullableWithRaw types.str (generators.toPretty { } default);
mkAttributeSet' = args: mkNullable' (args // { type = nixvimTypes.attrs; }); mkAttributeSet' = args: mkNullable' (args // { type = nixvimTypes.attrs; });
mkAttributeSet = default: description: mkAttributeSet' { inherit default description; }; mkAttributeSet = default: description: mkAttributeSet' { inherit default description; };