Skip to content

Commit fcfb3b3

Browse files
authored
Use static_first, static_last, and static_step from Static.jl
1 parent a29940f commit fcfb3b3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/StaticArrayInterface.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ using PrecompileTools
4646
permute, invariant_permutation, field_type, reduce_tup, find_first_eq,
4747
OptionallyStaticUnitRange, OptionallyStaticStepRange, OptionallyStaticRange,
4848
IntType,
49-
SOneTo, SUnitRange
49+
SOneTo, SUnitRange,
50+
static_first, static_last, static_step
5051

5152
using IfElse
5253

@@ -323,10 +324,6 @@ end
323324
return setindex!(A, val; kwargs...)
324325
end
325326

326-
@inline static_first(x) = Static.maybe_static(known_first, first, x)
327-
@inline static_last(x) = Static.maybe_static(known_last, last, x)
328-
@inline static_step(x) = Static.maybe_static(known_step, step, x)
329-
330327
@inline function _to_cartesian(a, i::IntType)
331328
@inbounds(CartesianIndices(ntuple(dim -> indices(a, dim), Val(ndims(a))))[i])
332329
end

0 commit comments

Comments
 (0)