Closed mattuntergassmair closed 4 years ago
Do we really need two functions?
function id2index(frame::EntityFrame{S,D,I}, id::I) where {S,D,I}
entity_index = findfirst(id, frame)
if entity_index == nothing
throw(BoundsError(frame, id))
end
return entity_index
end
function Records.id2index(frame::Frame{A}, id) where {A<:EntityAction}
entity_index = findfirst(id, frame)
if (entity_index === nothing) throw(BoundsError(frame, id)) end
return entity_index
end
It seems like having frame::Frame{E} where E
should be enough?
(feel free to merge this PR and leave this for later)
Same fix as in Records.jl, see https://github.com/sisl/Records.jl/pull/8