Skip to content

Latest commit

 

History

History
5 lines (4 loc) · 504 Bytes

change_custom_protocol_handler_response_to_cow.md

File metadata and controls

5 lines (4 loc) · 504 Bytes
wry
minor

Change return type of custom protocol handlers from Result<Response<Vec<u8>>> to Result<Response<Cow<'static, [u8]>>>. This allows the handlers to return static resources without heap allocations. This is effective when you embed some large files like bundled JavaScript source as &'static [u8] using include_bytes!.