Skip to content

Commit

Permalink
fix namedtuple
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Brown committed Sep 20, 2023
1 parent ddc2ec5 commit daec705
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/stdlib/models/Op.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using .ThCategory

rename(::Nothing, ::Dict{Symbol,Symbol}) = nothing
rename(nt::NamedTuple, d::Dict{Symbol,Symbol}) =
NamedTuple(Dict([get(d, k, k) => v for (k, v) in pairs(nt)]))
NamedTuple(get(d, k, k) => v for (k, v) in pairs(nt))


@instance ThCategory{ObT, HomT} (;model::OpC{ObT, HomT, C}) where {ObT, HomT, C} begin
Expand Down
1 change: 1 addition & 0 deletions test/stdlib/models/Op.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ using .ThCategory

@test id(2) == [1,2]
@test compose([1,1,1,3,2], [5]) == [2]
@test compose([1,1,1,3,2], [5]; context=(;)) == [2]
@test codom([5]) == 1
@test dom([5]; context=(c=10,)) == 10
end
Expand Down

0 comments on commit daec705

Please sign in to comment.