Commit ccc8baf
committed
jsondocck: Use correct index for error message.
If you misused a count command like `@count $some.selector '"T'"`, you would panic with OOB:
```
thread 'main' panicked at src/tools/jsondocck/src/main.rs:76:92:
index out of bounds: the len is 2 but the index is 2
```
Fixing this typo, we now get.
```
Invalid command: Second argument to @count must be a valid usize (got `"T"`) on line 20
```
As some point I want to rewrite this code to avoid indexing in general, but this is a nice small fix.1 parent c872a14 commit ccc8baf
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
74 | | - | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
0 commit comments