Commit 1d06b9b
Add a
This splits a `Body::from_open_file` out from `Body::from_file` so that
users who want to use a file opened in a manner other than `File::open`
can do so.
In particular, this will help users using [`cap_std::fs::Dir::open`] to
open files without requiring http-types to have a dependency on `cap_std`.
[`cap_std::fs::Dir::open`]: https://docs.rs/cap-std/latest/cap_std/fs/struct.Dir.html#method.open
Co-authored-by: brightly-salty <[email protected]>Body::from_open_file constructor.1 parent 482106b commit 1d06b9b
1 file changed
+33
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
355 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
356 | 357 | | |
357 | 358 | | |
358 | 359 | | |
| |||
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
373 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
374 | 404 | | |
375 | 405 | | |
376 | 406 | | |
| |||
0 commit comments