Commit 0071816
authored
fix: embedding splicer error handling (#255)
This commit fixes a regression in function generation when error
handling is involved.
The buggy code over-eagerly checks whether there is an error type
type present on a result, when there may legitimately not
be (e.g. `result<t>` in WIT). The fix is to check *only* for whether
the types are returned as a pair (indicating a `result`) at all.1 parent 21b657c commit 0071816
File tree
3 files changed
+5
-7
lines changed- crates/spidermonkey-embedding-splicer/src
- test/cases
- http-request
- http-server
3 files changed
+5
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
862 | | - | |
863 | | - | |
864 | | - | |
| 862 | + | |
865 | 863 | | |
866 | 864 | | |
867 | 865 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments