Skip to content

Adapt StaticArrays recursively.#104

Merged
maleadt merged 1 commit intomasterfrom
tb/staticarrays
Mar 3, 2026
Merged

Adapt StaticArrays recursively.#104
maleadt merged 1 commit intomasterfrom
tb/staticarrays

Conversation

@maleadt
Copy link
Member

@maleadt maleadt commented Mar 2, 2026

The extension currently only supported adapting to static arrays; also add a rule to recursively adapt from them.

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/ext/AdaptStaticArraysExt.jl b/ext/AdaptStaticArraysExt.jl
index 3f16da4..b139bd2 100644
--- a/ext/AdaptStaticArraysExt.jl
+++ b/ext/AdaptStaticArraysExt.jl
@@ -6,7 +6,7 @@ isdefined(Base, :get_extension) ? (using StaticArrays) : (using ..StaticArrays)
 Adapt.adapt_storage(::Type{<:SArray{S}}, xs::Array) where {S} = SArray{S}(xs)
 Adapt.adapt_storage(::Type{SArray}, xs::Array) = SArray{Tuple{size(xs)...}}(xs)
 
-Adapt.adapt_structure(to, x::SArray{S,T,N,L}) where {S,T,N,L} =
+Adapt.adapt_structure(to, x::SArray{S, T, N, L}) where {S, T, N, L} =
     SArray{S}(ntuple(i -> Adapt.adapt(to, x[i]), Val(L)))
 
 end

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.04%. Comparing base (384ca25) to head (f768872).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #104      +/-   ##
==========================================
+ Coverage   91.86%   92.04%   +0.18%     
==========================================
  Files           7        7              
  Lines          86       88       +2     
==========================================
+ Hits           79       81       +2     
  Misses          7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maleadt maleadt merged commit abd673d into master Mar 3, 2026
23 checks passed
@maleadt maleadt deleted the tb/staticarrays branch March 3, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant