DEV Community

Discussion on: How to write a Queue in Rust

lonami profile image

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.

virtualkirill profile image
Kirill Vasiltsov Author

I agree that using VecDeque is a great idea!