Commit ba30ce0
committed
Merge rust-bitcoin#4889: Manually print
cde4736 Manually print InvalidChecksum error (Tobin C. Harding)
d1e430b Add regression tests for Display of ParseError (Tobin C. Harding)
Pull request description:
Currently the `ParseError` is a mess. The correct fix is likely to use an associated type in `Decodable` for the error but that can wait.
Right now we are using `hex` in the `Display` impl for `ParseError`. This will cause trouble when we move the error type to `consenus_encoding` because `hex` is a feature. Even if we do not do so this code is a mainitenance burden.
Just manually print hex characters by accessing the array. Logic is already tested with a static string, this patch does not change the output.
ACKs for top commit:
apoelstra:
ACK cde4736; successfully ran local tests
Tree-SHA512: f43cb3f2ffa5fb7ed8ce9172acd1f05c29841ae05af5fa124e22d1123b18c86013db0ff6db37f9e944f63016b5bdf8fe91fecb129ce0fad282f04ef5d4401055InvalidChecksum
1 file changed
+46
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
191 | | - | |
192 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
| |||
257 | 259 | | |
258 | 260 | | |
259 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
0 commit comments