Skip to content

Conversation

@ripytide
Copy link

@ripytide ripytide commented Nov 1, 2023

Switched RadixHeapMap::push() to return a Result rather than simply panicking when given a greater key than the current top key.

This is a nicer API to work with as it allows the caller to choose how they want to handle such an error rather than being forced to panic.

The use-case that inspired this change was I was trying to debug a scenario when a greater key was given by catching the faulty push and doing some dbg!()s but I was unable to since push() panics internally.

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.

1 participant