Ah, this is a bug in that pop! method. I'm working on a fix.

On Fri, Oct 23, 2015 at 8:42 AM, Matt <[email protected]> wrote:

> I want to check if a key is in a set, and pop! it if it is the case.
>
>
> 1. In order to do that, I can rely on a try / catch statement (i.e. try
> pop!(x, key)) or a default key (i.e. pop!(x, key, nothing)). Is one
> preferable to the other in term of speed?
>
> 2.. pop!(x, key, nothing) returns nothing even if key is in x. Is this
> expected?
>
>
> nothing == pop!(Set(1:2), 2, nothing)
>
> true
>
>
>

Reply via email to