mirror of
https://github.com/helix-editor/helix
synced 2026-07-30 00:04:11 +02:00
cd6a852c9e
This will be used by the cargo indent-check xtask to validate queries, similar to the existing indent tests in helix-core.
32 lines
409 B
Julia
32 lines
409 B
Julia
module M
|
|
|
|
function process(items)
|
|
total = 0
|
|
for v in items
|
|
if v > 0
|
|
total += v
|
|
elseif v < 0
|
|
total -= v
|
|
else
|
|
total += 1
|
|
end
|
|
end
|
|
config = Dict(
|
|
"a" => 1,
|
|
"b" => 2,
|
|
)
|
|
return total
|
|
end
|
|
|
|
function safe(x)
|
|
try
|
|
risky(x)
|
|
catch e
|
|
handle(e)
|
|
finally
|
|
cleanup()
|
|
end
|
|
end
|
|
|
|
end
|