Commit a4f7f94
committed
Turn str_check function into a macro and put it in id_macros
No longer pass as an argument to str_id macro. I think str_check was defined
originally as a function because we were novice macro users. That function
was always passed for construction of the type, it was used exclusively for
that purpose, and it seems unlikely that it will need to be varied.
Have str_check just evaluate to an Option<String> rather than a Result.
Promote the Option to the error in str_id. Removes duplication and
isolates the use of the DmResult type to two places.
Signed-off-by: mulhern <amulhern@redhat.com>1 parent 7e8718b commit a4f7f94
2 files changed
Lines changed: 37 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
8 | 31 | | |
9 | 32 | | |
10 | 33 | | |
11 | 34 | | |
12 | 35 | | |
13 | | - | |
| 36 | + | |
14 | 37 | | |
15 | 38 | | |
16 | 39 | | |
| |||
27 | 50 | | |
28 | 51 | | |
29 | 52 | | |
30 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
31 | 58 | | |
32 | 59 | | |
33 | 60 | | |
| |||
56 | 83 | | |
57 | 84 | | |
58 | 85 | | |
59 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
60 | 91 | | |
61 | 92 | | |
62 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 65 | | |
88 | 66 | | |
89 | 67 | | |
90 | | - | |
| 68 | + | |
91 | 69 | | |
92 | 70 | | |
93 | 71 | | |
94 | | - | |
| 72 | + | |
95 | 73 | | |
96 | 74 | | |
97 | 75 | | |
| |||
115 | 93 | | |
116 | 94 | | |
117 | 95 | | |
118 | | - | |
| 96 | + | |
119 | 97 | | |
120 | 98 | | |
121 | 99 | | |
| |||
0 commit comments