Skip to content

Commit e777b1d

Browse files
committed
don't force eager conversions when not necessary, fix JuliaArrays#228
1 parent 1581d70 commit e777b1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/utils.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,5 @@ Element conversion before assignment in a StructArray.
195195
By default, this calls `convert(T, x)`; however, you can specialize it for other types.
196196
"""
197197
maybe_convert_elt(::Type{T}, vals) where T = convert(T, vals)
198-
maybe_convert_elt(::Type{T}, vals::Tuple) where T = T <: Tuple ? convert(T, vals) : vals # assignment of fields by position
199-
maybe_convert_elt(::Type{T}, vals::NamedTuple) where T = T<:NamedTuple ? convert(T, vals) : vals # assignment of fields by name
198+
maybe_convert_elt(::Type{T}, vals::Tuple) where T = vals
199+
maybe_convert_elt(::Type{T}, vals::NamedTuple) where T = vals

0 commit comments

Comments
 (0)