Commit 33e27c7
committed
Streamline cache-related query functions.
There are three query vtable functions related to the `cache_on_disk_if`
modifier:
- `will_cache_on_disk_for_key_fn`
- `try_load_from_disk_fn`
- `is_loadable_from_disk_fn`
These are all function ptrs within an `Option`. They each have a wrapper
that returns `false`/`None` if the function ptr is missing.
This commit removes the `Option` wrappers. In the `None` case we now set
the function ptr to a trivial closure that returns `false`/`None`. The
commit also removes some typedefs that each have a single use.
All this is a bit simpler, with less indirection. More importantly, it
enables the following commit, which will make more related changes.1 parent b3bbeb4 commit 33e27c7
2 files changed
Lines changed: 22 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 66 | | |
79 | 67 | | |
80 | 68 | | |
| |||
129 | 117 | | |
130 | 118 | | |
131 | 119 | | |
132 | | - | |
| 120 | + | |
133 | 121 | | |
134 | 122 | | |
135 | 123 | | |
| |||
145 | 133 | | |
146 | 134 | | |
147 | 135 | | |
148 | | - | |
149 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
150 | 144 | | |
151 | 145 | | |
152 | 146 | | |
| |||
176 | 170 | | |
177 | 171 | | |
178 | 172 | | |
179 | | - | |
| 173 | + | |
180 | 174 | | |
181 | 175 | | |
182 | 176 | | |
| |||
187 | 181 | | |
188 | 182 | | |
189 | 183 | | |
190 | | - | |
191 | | - | |
| 184 | + | |
192 | 185 | | |
193 | 186 | | |
194 | 187 | | |
| |||
198 | 191 | | |
199 | 192 | | |
200 | 193 | | |
201 | | - | |
| 194 | + | |
202 | 195 | | |
203 | 196 | | |
204 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
| 572 | + | |
573 | 573 | | |
574 | | - | |
| 574 | + | |
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| |||
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
583 | | - | |
| 583 | + | |
584 | 584 | | |
585 | | - | |
| 585 | + | |
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
| 594 | + | |
595 | 595 | | |
596 | | - | |
| 596 | + | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
600 | | - | |
| 599 | + | |
| 600 | + | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| |||
0 commit comments