Commit 4c51a66
committed
Don't share
All the tests passed, so it doesn't seem they need to be shared.
Plus they should be item/page-specific.
I'm not sure why they were shared before. I think the reason `id_map`
worked as a shared value before is that it is cleared before rendering
each item (in `render_item`). And then I'm guessing `deref_id_map`
worked because it's a hashmap keyed by `DefId`, so there was no overlap
(though I'm guessing we could have had issues in the future).
Note that `id_map` currently still has to be cleared because otherwise
child items would inherit the `id_map` of their parent. I'm hoping to
figure out a way to stop cloning `Context`, but until then we have to
reset `id_map`.id_map and deref_id_map
1 parent 3bc879e commit 4c51a66
2 files changed
+20
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
75 | | - | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
98 | | - | |
| 103 | + | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
| |||
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
156 | | - | |
157 | | - | |
| 161 | + | |
| 162 | + | |
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
| |||
387 | 392 | | |
388 | 393 | | |
389 | 394 | | |
390 | | - | |
391 | | - | |
392 | 395 | | |
393 | 396 | | |
394 | 397 | | |
| |||
418 | 421 | | |
419 | 422 | | |
420 | 423 | | |
| 424 | + | |
| 425 | + | |
421 | 426 | | |
422 | 427 | | |
423 | 428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | 124 | | |
130 | 125 | | |
131 | 126 | | |
| |||
650 | 645 | | |
651 | 646 | | |
652 | 647 | | |
653 | | - | |
| 648 | + | |
654 | 649 | | |
655 | 650 | | |
656 | 651 | | |
| |||
810 | 805 | | |
811 | 806 | | |
812 | 807 | | |
813 | | - | |
| 808 | + | |
814 | 809 | | |
815 | 810 | | |
816 | 811 | | |
| |||
849 | 844 | | |
850 | 845 | | |
851 | 846 | | |
852 | | - | |
| 847 | + | |
853 | 848 | | |
854 | 849 | | |
855 | 850 | | |
| |||
1189 | 1184 | | |
1190 | 1185 | | |
1191 | 1186 | | |
1192 | | - | |
1193 | | - | |
| 1187 | + | |
1194 | 1188 | | |
1195 | 1189 | | |
1196 | 1190 | | |
| |||
1497 | 1491 | | |
1498 | 1492 | | |
1499 | 1493 | | |
1500 | | - | |
| 1494 | + | |
1501 | 1495 | | |
1502 | 1496 | | |
1503 | 1497 | | |
| |||
2046 | 2040 | | |
2047 | 2041 | | |
2048 | 2042 | | |
2049 | | - | |
| 2043 | + | |
2050 | 2044 | | |
2051 | 2045 | | |
2052 | 2046 | | |
| |||
0 commit comments