|
|
|
|
|
by amluto
881 days ago
|
|
> or even just skipping blank lines, hyper does things its own way. Ugh. IMO a bit benefit of Rust is that you can’t do wild-west-YOLO buffer twiddling without “unsafe,” so people will write better code. But it really looks like httparse missed the memo. https://github.com/seanmonstar/httparse/blob/v1.8.0/src/iter... iter::Bytes looks like an awkward wrapper around slices with all the safety removed. So you can port nasty C-style code right over. Seriously, it should not be hard to efficiently strip a prefix off a u8 slice in safe Rust. For example, split_first. |
|