Skip to content

Commit dcbd6bb

Browse files
committed
Fix unsafe_length_unit_range
1 parent 14ba709 commit dcbd6bb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ranges.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,7 @@ function Base.length(r::OptionallyStaticUnitRange)
171171
end
172172
end
173173

174-
function unsafe_length_unit_range(start, stop)
175-
return Base.checked_add(Base.checked_sub(start, stop), one(T))
176-
end
174+
unsafe_length_unit_range(start::Integer, stop::Integer) = Int(start - stop + 1)
177175

178176
"""
179177
indices(x[, d])

0 commit comments

Comments
 (0)