turbo
0e92381e - Reimplement RopeReader to borrow Bytes/InnerRope

Commit
3 years ago
Reimplement RopeReader to borrow Bytes/InnerRope I'm hoping this'll eek out a bit more performance from the `RopeReader` and everything dependent on it. This was complicated a bit by Hyper's `wrap_stream`, which requires that the stream be `'static`. Because the `RopeReader` borrows data from the `Rope`, we were bound by the rope's lifetime. But by using `Box` and leaking/reconstituting, we're able to allow the RopeReader to own the Rope's structure while also allowing regular iteration to simply borrow.
Author
Parents
Loading