thruster-rs / Thruster

A fast, middleware based, web framework written in Rust
MIT License
1.07k stars 47 forks source link

Avoid unnnecessary String conversions in Hyper context #93

Closed whitfin closed 5 years ago

whitfin commented 5 years ago

Now that set_body accepts a Vec<u8>, there's no need for this UTF8 check/conversion in the Hyper context. It can go directly into a Hyper Body, which should be a little more efficient.

trezm commented 5 years ago

Great call! :+1: