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

Implement Hash/PartialEq/Show for PriorityQueue. #16147

Closed
wants to merge 2 commits into from

Conversation

nham
Copy link
Contributor

@nham nham commented Jul 31, 2014

I'm a bit unsure about this since it relies on sorting the underlying vector, an O(n log n) operation. However, I haven't been able to come up with an alternative approach.

cc #15294

@lilyball
Copy link
Contributor

Since it requires sorting the vector, I would say it shouldn't implement these traits.

@alexcrichton
Copy link
Member

Yes for now it seems like it may not be worth implementing these traits for a priority queue. It would be quite nice to have show, but the implementations shouldn't bend over too far backwards to be implemented.

@nham
Copy link
Contributor Author

nham commented Aug 1, 2014

Understood. Is it planned that implementation of PriorityQueue will be changing? I don't see any alternative way to do Show given the current PriorityQueue implementation (maybe I'm missing something?)

@alexcrichton
Copy link
Member

I am unaware of a planned reimplementation of PriorityQueue.

@nham nham closed this Aug 1, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 3, 2024
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.

3 participants