Skip to content

Commit 269e893

Browse files
committed
Delete unnecessary lastindex() method
1 parent 759512c commit 269e893

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RecursiveArrayTools"
22
uuid = "731186ca-8d62-57ce-b412-fbd966d074cd"
33
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com>"]
4-
version = "3.46.0"
4+
version = "3.46.1"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/array_partition.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ end
280280

281281
# Interface for the linear indexing. This is just a view of the underlying nested structure
282282
@inline Base.firstindex(A::ArrayPartition) = 1
283-
@inline Base.lastindex(A::ArrayPartition) = length(A)
284283

285284
Base.@propagate_inbounds function Base.getindex(A::ArrayPartition, i::Int)
286285
@boundscheck checkbounds(A, i)

test/partitions_test.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ y = ArrayPartition(ArrayPartition([1], [2.0]), ArrayPartition([3], [4.0]))
135135
# indexing
136136
@inferred first(x)
137137
@inferred last(x)
138+
@test lastindex(x) == length(x)
138139

139140
# recursive
140141
@inferred recursive_mean(x)

0 commit comments

Comments
 (0)