Skip to content

Commit 3c0a03e

Browse files
authored
Move the @optional block to the end in the ABI lint. (#550)
This should make the query marginally faster.
1 parent c30bf3a commit 3c0a03e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lints/function_changed_abi.ron

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SemverQuery(
1616
importable_path {
1717
path @output @tag
1818
}
19-
19+
2020
abi_: abi {
2121
name @output @tag
2222
}
@@ -27,19 +27,19 @@ SemverQuery(
2727
item {
2828
... on Function {
2929
visibility_limit @filter(op: "=", value: ["$public"])
30-
30+
3131
importable_path {
3232
path @filter(op: "=", value: ["%path"])
3333
}
3434
35+
new_abi_: abi {
36+
name @filter(op: "!=", value: ["%name"]) @output
37+
}
38+
3539
span_: span @optional {
3640
filename @output
3741
begin_line @output
3842
}
39-
40-
new_abi_: abi {
41-
name @filter(op: "!=", value: ["%name"]) @output
42-
}
4343
}
4444
}
4545
}

0 commit comments

Comments
 (0)