Skip to content

Commit dac3df0

Browse files
vchuravymaleadt
authored andcommitted
simplify
1 parent 4d37936 commit dac3df0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/array.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,14 @@ end
4949
# these are stored contiguously and require a selector array (handled by us)
5050
# As well as "mutable singleton" types like `Symbol` that use pointer-identity
5151

52-
function valid_leaftype(@nospecialize(T))
53-
Base.allocatedinline(T) || (Base.ismutabletype(T) && Base.datatype_fieldcount(T) == 0)
54-
end
55-
5652
function valid_type(@nospecialize(T))
57-
if valid_leaftype(T)
53+
if Base.allocatedinline(T)
5854
if hasfieldcount(T)
5955
return all(valid_type, fieldtypes(T))
6056
end
6157
return true
58+
elseif Base.ismutabletype(T)
59+
return Base.datatype_fieldcount(T) == 0
6260
end
6361
return false
6462
end

0 commit comments

Comments
 (0)