Skip to content

Commit

Permalink
Import @boundscheck and @inbounds from Base
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrobinson251 committed Aug 31, 2019
1 parent e2d543a commit 9235f44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/iterators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using .Base:
@inline, Pair, AbstractDict, IndexLinear, IndexCartesian, IndexStyle, AbstractVector, Vector,
tail, tuple_type_head, tuple_type_tail, tuple_type_cons, SizeUnknown, HasLength, HasShape,
IsInfinite, EltypeUnknown, HasEltype, OneTo, @propagate_inbounds, Generator, AbstractRange,
LinearIndices, (:), |, +, -, !==, !, <=, <, missing, map, any
LinearIndices, (:), |, +, -, !==, !, <=, <, missing, map, any, @boundscheck, @inbounds

import .Base:
first, last,
Expand Down Expand Up @@ -1100,7 +1100,7 @@ length(s::Stateful) = length(s.itr) - s.taken
Returns the one and only element of collection `x`, and throws an `ArgumentError` if the
collection has zero or multiple elements.
"""
Base.@propagate_inbounds function only(x)
@propagate_inbounds function only(x)
i = iterate(x)
@boundscheck if i === nothing
throw(ArgumentError("Collection is empty, must contain exactly 1 element"))
Expand Down

0 comments on commit 9235f44

Please sign in to comment.