Skip to content

Commit da5f29c

Browse files
committed
Rename variables for consistency.
1 parent c7edebb commit da5f29c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/abstractarray.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ for (D, S) in ((GPUArray, AbstractArray), (Array, GPUArray), (GPUArray, GPUArray
112112

113113
function Base.copyto!(dest::$D{T}, d_range::CartesianIndices{1},
114114
src::$S{T}, s_range::CartesianIndices{1}) where T
115-
amount = length(d_range)
116-
if length(s_range) != amount
117-
throw(ArgumentError("Copy range needs same length. Found: dest: $amount, src: $(length(s_range))"))
115+
len = length(d_range)
116+
if length(s_range) != len
117+
throw(ArgumentError("Copy range needs same length. Found: dest: $len, src: $(length(s_range))"))
118118
end
119-
amount == 0 && return dest
119+
len == 0 && return dest
120120
d_offset = first(d_range)[1]
121121
s_offset = first(s_range)[1]
122-
copyto!(dest, d_offset, materialize(src), s_offset, amount)
122+
copyto!(dest, d_offset, materialize(src), s_offset, len)
123123
end
124124

125125
function Base.copyto!(dest::$D{T, N}, src::$S{T, N}) where {T, N}

0 commit comments

Comments
 (0)