WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit d0060e7

Browse files
authored
Add propagate_inbounds to some SubString operations (JuliaLang#59615)
1 parent cb8734a commit d0060e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/strings/substring.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ function isvalid(s::SubString, i::Integer)
109109
@inbounds return ib && isvalid(s.string, s.offset + i)::Bool
110110
end
111111

112-
thisind(s::SubString{String}, i::Int) = _thisind_str(s, i)
113-
nextind(s::SubString{String}, i::Int) = _nextind_str(s, i)
112+
@propagate_inbounds thisind(s::SubString{String}, i::Int) = _thisind_str(s, i)
113+
@propagate_inbounds nextind(s::SubString{String}, i::Int) = _nextind_str(s, i)
114114

115115
parent(s::SubString) = s.string
116116
parentindices(s::SubString) = (s.offset + 1 : thisind(s.string, s.offset + s.ncodeunits),)

0 commit comments

Comments
 (0)