mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-09 03:56:05 +01:00
ci/rust-analyzer: filter deprecated sub-types
This commit is contained in:
parent
44ed7456c7
commit
a26641c07c
1 changed files with 4 additions and 2 deletions
|
|
@ -58,7 +58,9 @@ let
|
||||||
}
|
}
|
||||||
else if anyOf != null then
|
else if anyOf != null then
|
||||||
let
|
let
|
||||||
possibleTypes = lib.filter (sub: !(sub.type == "null" && nullable)) anyOf;
|
possibleTypes = lib.filter (
|
||||||
|
sub: !(sub.type or null == "null" && nullable) && !(sub.deprecated or false)
|
||||||
|
) anyOf;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
kind = "oneOf";
|
kind = "oneOf";
|
||||||
|
|
@ -198,7 +200,7 @@ let
|
||||||
enumDesc enum enumDescriptions
|
enumDesc enum enumDescriptions
|
||||||
else
|
else
|
||||||
let
|
let
|
||||||
subEnums = lib.filter (lib.hasAttr "enum") anyOf;
|
subEnums = lib.filter (sub: sub ? enum && !(sub.deprecated or false)) anyOf;
|
||||||
subEnum =
|
subEnum =
|
||||||
assert lib.assertMsg (lib.length subEnums == 1)
|
assert lib.assertMsg (lib.length subEnums == 1)
|
||||||
"anyOf types may currently only contain a single enum. Found ${
|
"anyOf types may currently only contain a single enum. Found ${
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue