Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Queue::dequeue return the removed value #237

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

dzhu
Copy link
Contributor

@dzhu dzhu commented Apr 27, 2023

Presumably the previous pattern was copied straight from the C++ version, which presumably does it that way because of the lack of sum types. But in Rust, it is more idiomatic to return a value, like Vec::pop.

Copy link
Collaborator

@Garvys Garvys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing to rustfst ! This looks very good to me ! :-)

Can you push a dummy commit because it seems Workflow runs that have been awaiting approval for more than 30 days are automatically deleted.

Sorry that's my fault !

Thanks !

Presumably the previous pattern was copied straight from the C++
version, which presumably does it that way because of the lack of sum
types. But in Rust, it is more idiomatic to return a value, like
`Vec::pop`.
@dzhu
Copy link
Contributor Author

dzhu commented Sep 6, 2023

Thanks, and no worries at all! I've pushed a new commit.

@Garvys Garvys merged commit 3baaf00 into garvys-org:main Sep 6, 2023
24 checks passed
@dzhu dzhu deleted the queue-dequeue branch September 10, 2023 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants