Skip to content

Commit 71efff6

Browse files
committed
trivial code cleanup
1 parent b954fa6 commit 71efff6

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/ImageTransformations.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ using Interpolations, AxisAlgorithms
88
using OffsetArrays
99
using ColorVectorSpace
1010

11-
import Base: eltype, size, length
1211
using Base: tail, Indices
13-
using Base.Cartesian
14-
using .ColorTypes: AbstractGray, TransparentGray, TransparentRGB
1512

1613
# these two symbols previously live in ImageTransformations
1714
import ImageBase: restrict, restrict!

src/autorange.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ struct CornerIterator{I<:CartesianIndex}
5454
end
5555
CornerIterator(R::CartesianIndices) = CornerIterator(first(R), last(R))
5656

57-
eltype(::Type{CornerIterator{I}}) where {I} = I
57+
Base.eltype(::Type{CornerIterator{I}}) where {I} = I
5858
Base.Iterators.IteratorSize(::Type{CornerIterator{I}}) where {I<:CartesianIndex{N}} where {N} = Base.Iterators.HasShape{N}()
5959

6060
# in 0.6 we could write: 1 .+ (iter.stop.I .- iter.start.I .!= 0)
61-
size(iter::CornerIterator{CartesianIndex{N}}) where {N} = ntuple(d->iter.stop.I[d]-iter.start.I[d]==0 ? 1 : 2, Val(N))::NTuple{N,Int}
62-
length(iter::CornerIterator) = prod(size(iter))
61+
Base.size(iter::CornerIterator{CartesianIndex{N}}) where {N} = ntuple(d->iter.stop.I[d]-iter.start.I[d]==0 ? 1 : 2, Val(N))::NTuple{N,Int}
62+
Base.length(iter::CornerIterator) = prod(size(iter))
6363

6464
@inline function Base.iterate(iter::CornerIterator{<:CartesianIndex})
6565
if any(map(>, iter.start.I, iter.stop.I))

0 commit comments

Comments
 (0)