Commit 3d82836
committed
ref(chunks): Make
Refactor `get_sha1_checksums` to be infallible by using `NonZeroUsize` for the chunk size. Is the only possible failure reason was the chunk size being zero, the method no longer needs to return a `Result`.
This change will slightly simplify the implementation for #2328.get_sha1_checksums infallible1 parent 7ae13ba commit 3d82836
File tree
4 files changed
+15
-21
lines changed- src
- commands/build
- utils
- chunks
4 files changed
+15
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
| 511 | + | |
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
641 | | - | |
| 641 | + | |
| 642 | + | |
642 | 643 | | |
643 | 644 | | |
644 | 645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 163 | + | |
167 | 164 | | |
168 | 165 | | |
169 | 166 | | |
170 | | - | |
| 167 | + | |
171 | 168 | | |
172 | 169 | | |
173 | 170 | | |
174 | 171 | | |
175 | 172 | | |
176 | 173 | | |
177 | | - | |
| 174 | + | |
178 | 175 | | |
179 | 176 | | |
180 | 177 | | |
| |||
245 | 242 | | |
246 | 243 | | |
247 | 244 | | |
| 245 | + | |
| 246 | + | |
248 | 247 | | |
249 | | - | |
250 | | - | |
| 248 | + | |
251 | 249 | | |
252 | 250 | | |
253 | 251 | | |
| |||
268 | 266 | | |
269 | 267 | | |
270 | 268 | | |
| 269 | + | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
274 | | - | |
| 273 | + | |
275 | 274 | | |
276 | 275 | | |
277 | 276 | | |
| |||
289 | 288 | | |
290 | 289 | | |
291 | 290 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | 291 | | |
0 commit comments