Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 2 additions & 8 deletions src/keypath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,7 @@ See also [`KeyPath`](@ref), [`haskeypath`](@ref), and [`setkeypath!`](@ref).

# Examples
```jldoctest
julia> x = Dict(:a => 3, :b => Dict(:c => 4, "d" => [5, 6, 7]))
Dict{Symbol, Any} with 2 entries:
:a => 3
:b => Dict{Any, Any}(:c=>4, "d"=>[5, 6, 7])
julia> x = Dict(:a => 3, :b => Dict(:c => 4, "d" => [5, 6, 7]));

julia> getkeypath(x, KeyPath(:b, "d", 2))
6
Expand All @@ -140,10 +137,7 @@ See also [`KeyPath`](@ref), [`getkeypath`](@ref), and [`setkeypath!`](@ref).

# Examples
```jldoctest
julia> x = Dict(:a => 3, :b => Dict(:c => 4, "d" => [5, 6, 7]))
Dict{Symbol, Any} with 2 entries:
:a => 3
:b => Dict{Any, Any}(:c=>4, "d"=>[5, 6, 7])
julia> x = Dict(:a => 3, :b => Dict(:c => 4, "d" => [5, 6, 7]));

julia> haskeypath(x, KeyPath(:a))
true
Expand Down
3 changes: 1 addition & 2 deletions test/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ end
@test !Functors.isleaf(os)
os2 = fmap(x -> 2x, os)
@test os2 isa OrderedSet
@test os2[1] == 2
@test os2[2] == 4
@test collect(os2) == [2, 4]
end

@testset "Types are leaves" begin
Expand Down
Loading