VecDeque question

⚓ Rust    📅 2025-09-23    👤 surdeus    👁️ 8      

surdeus

Warning

This post was published 38 days ago. The information described in this article may have changed.

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: VecDeque question

VecDeque<u8> used as a fifo.

What I really need here is truncate_front() after I copied nbytes of u8 bytes from the slice(s) returned by as_slices(), but it isn't stabilized yet.

So I did the following, hoping that it would achieve similar performance:

    let drain = fifo.drain(0..nbytes);
    drop(drain);

Am I right that the performance should be similar?

1 post - 1 participant

Read full topic

🏷️ Rust_feed