Optimize appending deletion path in modify

This commit is contained in:
itchyny authored and Nico Williams committed 2023-07-07 20:11:10 -05:00
1 parent 371abc73ba
commit af57893bc2
1 file changed
+1 -1
+1 -1
View File
@@ -26,7 +26,7 @@ def _modify(paths; update):
), ),
( (
$$$$dot $$$$dot
| setpath([1]; .[1] + [$p]) | setpath([1, (.[1] | length)]; $p)
) )
) )
) | . as $dot | $dot[0] | delpaths($dot[1]); ) | . as $dot | $dot[0] | delpaths($dot[1]);