Skip to content

Commit a6f082c

Browse files
committed
Simplifications
1 parent 7b4dc77 commit a6f082c

File tree

2 files changed

+3
-331
lines changed

2 files changed

+3
-331
lines changed

src/kroneckerarray.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function _convert(A::Type{<:AbstractArray}, a::AbstractArray)
33
return convert(A, a)
44
end
55
# Custom `_convert` works around the issue that
6-
# `convert(::Type{<:Diagonal}, ::AbstractMatrix)` isnt' defined
6+
# `convert(::Type{<:Diagonal}, ::AbstractMatrix)` isn't defined
77
# in Julia v1.10 (https://github.com/JuliaLang/julia/pull/48895,
88
# https://github.com/JuliaLang/julia/pull/52487).
99
# TODO: Delete once we drop support for Julia v1.10.
@@ -34,14 +34,10 @@ arg1(a::KroneckerArray) = a.a
3434
arg2(a::KroneckerArray) = a.b
3535

3636
using Adapt: Adapt, adapt
37-
_adapt(to, a::AbstractArray) = adapt(to, a)
38-
Adapt.adapt_structure(to, a::KroneckerArray) = _adapt(to, arg1(a)) _adapt(to, arg2(a))
39-
40-
# Allows extra customization, like for `FillArrays.Eye`.
41-
_copy(a::AbstractArray) = copy(a)
37+
Adapt.adapt_structure(to, a::KroneckerArray) = adapt(to, arg1(a)) adapt(to, arg2(a))
4238

4339
function Base.copy(a::KroneckerArray)
44-
return _copy(arg1(a)) _copy(arg2(a))
40+
return copy(arg1(a)) copy(arg2(a))
4541
end
4642

4743
# Allows extra customization, like for `FillArrays.Eye`.

test/test_blocksparsearrays.jl

Lines changed: 0 additions & 324 deletions
This file was deleted.

0 commit comments

Comments
 (0)