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

Fixup IdSet docstring #54153

Merged
merged 3 commits into from
Apr 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions base/idset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
IdSet()

IdSet{T}() constructs a set (see [`Set`](@ref)) using
`===` as equality with values of type `V`.
`===` as equality with values of type `T`.

In the example below, the values are all `isequal` so they get overwritten.
The `IdSet` compares by `===` so preserves the 3 different keys.

Examples
≡≡≡≡≡≡≡≡
In the example below, the values are all `isequal` so they get overwritten in the ordinary `Set`.
The `IdSet` compares by `===` and so preserves the 3 different values.

# Examples
```jldoctest; filter = r"^\\s*([1\\.0]+|true)"
jakobnissen marked this conversation as resolved.
Show resolved Hide resolved
julia> Set(Any[true, 1, 1.0])
Set{Any} with 1 element:
1.0
Expand All @@ -22,6 +21,7 @@ IdSet{Any} with 3 elements:
1.0
1
true
```
"""
mutable struct IdSet{K} <: AbstractSet{K}
list::Memory{Any}
Expand Down