Skip to content

Commit b7cf166

Browse files
committed
move fn defn to abstractarray.jl
1 parent 2b59d1e commit b7cf166

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/SArray.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,3 @@ end
283283
function promote_rule(::Type{<:SArray{S,T,N,L}}, ::Type{<:SArray{S,U,N,L}}) where {S,T,U,N,L}
284284
SArray{S,promote_type(T,U),N,L}
285285
end
286-
287-
# SArrays may avoid the SubArray wrapper and consequently an additional level of indirection
288-
Base.view(S::SArray, I...) = getindex(S, I...)

src/abstractarray.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,3 +295,6 @@ if VERSION >= v"1.6.0-DEV.1334"
295295
return similar_type(typeof(a), Size(newlen))(Base.rest(Tuple(a), i + 1))
296296
end
297297
end
298+
299+
# SArrays may avoid the SubArray wrapper and consequently an additional level of indirection
300+
Base.view(S::SArray, I...) = getindex(S, I...)

0 commit comments

Comments
 (0)