-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`slices::Slices::get_range` was too closely following the example of `http_serve::Entity::get_range`: The latter is once-per-request, so just boxing is low-cost and makes sense to easily avoid monomorphization bloat when there are potentially many types of entity streams in one program. In Moonfire, it's used with different streams defined in the `moonfire_nvr::web::mp4`, `moonfire_nvr::bundled_ui`, and `http_serve::file` modules. Putting them all into a single boxless enum would be a pain. In particular, the last one is not a nameable type today and would need more generic parameters to implement the caller-demanded `Entity` definition. The former is once-per-slice, there are tons of slices per request, and it's easy to define a two-case enum right where it's needed. So the trade-off is quite different. Also fix up some out-of-date comments.
- Loading branch information
Showing
7 changed files
with
64 additions
and
60 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters