From fcfb3b3c3dbf459198199d28c2d9f986b4f56715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Sun, 19 Oct 2025 14:23:20 -0600 Subject: [PATCH] Use static_first, static_last, and static_step from Static.jl --- src/StaticArrayInterface.jl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/StaticArrayInterface.jl b/src/StaticArrayInterface.jl index 2100a47..6c632b9 100644 --- a/src/StaticArrayInterface.jl +++ b/src/StaticArrayInterface.jl @@ -46,7 +46,8 @@ using PrecompileTools permute, invariant_permutation, field_type, reduce_tup, find_first_eq, OptionallyStaticUnitRange, OptionallyStaticStepRange, OptionallyStaticRange, IntType, - SOneTo, SUnitRange + SOneTo, SUnitRange, + static_first, static_last, static_step using IfElse @@ -323,10 +324,6 @@ end return setindex!(A, val; kwargs...) end -@inline static_first(x) = Static.maybe_static(known_first, first, x) -@inline static_last(x) = Static.maybe_static(known_last, last, x) -@inline static_step(x) = Static.maybe_static(known_step, step, x) - @inline function _to_cartesian(a, i::IntType) @inbounds(CartesianIndices(ntuple(dim -> indices(a, dim), Val(ndims(a))))[i]) end