Commit ef1d69c
committed
Workaround compiler goof in Policy::translate_pk
These previously untested methods result in a compiler error if you ever
tried to call them. This happens because if you put &mut in front of the
type when you recursively pass it to another call you are actually
creating a &mut &mut since the argument may already be a &mut. This ends
up in infinite &muts prefix. The compiler only figures this out when you call
the method (not at compile time of the library).
I fixed this by having an inner function take a &mut FnMut as the argument
and so breaking the chain of &mut. The public functions remains the same.1 parent 42367cf commit ef1d69c
2 files changed
+58
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
169 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
170 | 197 | | |
171 | 198 | | |
172 | 199 | | |
| |||
184 | 211 | | |
185 | 212 | | |
186 | 213 | | |
187 | | - | |
| 214 | + | |
188 | 215 | | |
189 | 216 | | |
190 | 217 | | |
191 | 218 | | |
192 | 219 | | |
193 | | - | |
| 220 | + | |
194 | 221 | | |
195 | 222 | | |
196 | 223 | | |
197 | 224 | | |
198 | | - | |
| 225 | + | |
199 | 226 | | |
200 | 227 | | |
201 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
83 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
84 | 111 | | |
85 | 112 | | |
86 | 113 | | |
| |||
98 | 125 | | |
99 | 126 | | |
100 | 127 | | |
101 | | - | |
| 128 | + | |
102 | 129 | | |
103 | 130 | | |
104 | 131 | | |
| |||
0 commit comments