neqo icon indicating copy to clipboard operation
neqo copied to clipboard

Use `VecDeque::truncate_front` once stable

Open mxinden opened this issue 6 months ago • 0 comments

VecDeque::truncate_front isn't stable yet.

https://github.com/rust-lang/rust/issues/140667

Instead we do VecDeque::rotate_left followed by a VecDeque::truncate.

https://github.com/mozilla/neqo/blob/97c3fd4f59513f84e8aeefbf9f4d488b1dfc0b2f/neqo-transport/src/send_stream.rs#L548-L550

That is surprisingly fast.

https://github.com/mozilla/neqo/pull/2680

Still, once stable, we should switch to VecDeque::truncate_front.

mxinden avatar Jun 03 '25 15:06 mxinden