Commit 6240970
committed
rework API to use implement
this completely revamps the API. the `parse` function is gone, instead
you now construct a new `Parser` using `Parser::new` and then use the
iterator API on it which will yield a `next` until the whole input has
been parsed.
due to this there's now no longer a need to return a list of values from
the API as instead we return the individual events (or errors) step by
step. thus the dependency on `alloc` and `heapless` has been removed.
to get the same result as before (everything collected into a vector)
the `collect` API of `Iterator` can be used by consumers.Iterator
1 parent 339f7e7 commit 6240970
File tree
8 files changed
+122
-154
lines changed- .github/workflows
- examples/stm32f4-event-printer
- src
- src
8 files changed
+122
-154
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 17 | + | |
23 | 18 | | |
24 | 19 | | |
25 | 20 | | |
| |||
31 | 26 | | |
32 | 27 | | |
33 | 28 | | |
34 | | - | |
| 29 | + | |
35 | 30 | | |
36 | | - | |
| 31 | + | |
37 | 32 | | |
38 | | - | |
| 33 | + | |
39 | 34 | | |
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
43 | 38 | | |
44 | | - | |
| 39 | + | |
45 | 40 | | |
46 | 41 | | |
47 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 22 | + | |
27 | 23 | | |
28 | 24 | | |
29 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
| |||
24 | 18 | | |
25 | 19 | | |
26 | 20 | | |
27 | | - | |
28 | | - | |
| 21 | + | |
| 22 | + | |
29 | 23 | | |
30 | 24 | | |
31 | 25 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
0 commit comments