DEV Community

Discussion on: How to write a Queue in Rust

Collapse
 
lonami profile image
Lonami

As the post says, this implementation might not be the most performant. However, performance would probably be good enough by simply replacing the Vec with a VecDeque. Not sure if this wasn't used for the purpose of teaching or because it would become too trivial.

Collapse
 
precosmicowl profile image
Kirill Vasiltsov

I agree that using VecDeque is a great idea!