Commit de249b6
committed
ea9b5d1 refactor(blocking): propagate `hex-conservative` errors instead of `.unwrap()`. (Leonardo Lima)
c2c5485 refactor(submit_package): use `unwrap_or_default` instead of `.unwrap()` (Leonardo Lima)
Pull request description:
### Description
- use `unwrap_or_default()` instead of `.unwrap()`, ideally it should return a specific error variant, it'd be a breaking change though and can be added in a follow-up.
- it's only possible to use the internal `minreq::Error` to wrap the `serde_json::Error`, but not the `reqwest::Error` as it does not have public constructors.
### Notes to the reviewers
I personally wanted to remove the `.unwrap()` and properly handle the error, though the options I had in mind:
- (i) adding a new `SerdeJson` variant is a breaking change; we can do it as a follow-up for 0.13.0
- (ii) mapping and wrapping it into either minreq/reqwest errors is only possible in minreq, so I thought it's better to keep it standard and use `.unwrap_or_default()` on both for now.
ACKs for top commit:
luisschwab:
ACK ea9b5d1
ValuedMammal:
ACK ea9b5d1
Tree-SHA512: 860e9351e256b8bd494d6cac259986b20b2e97c4955abce5cbe1663f47df48665262d440954899177c2482377d2ef558cd8fe6d32f635b61b3ba2be1e03a92ae
2 files changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
337 | | - | |
| 335 | + | |
| 336 | + | |
338 | 337 | | |
339 | 338 | | |
340 | 339 | | |
| |||
0 commit comments