Skip to content

Commit d271b78

Browse files
committed
improve TODO notes (StefanKarpinski)
1 parent 1eb7718 commit d271b78

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

base/deprecated.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,8 +1485,11 @@ end
14851485
using .DSP
14861486
export conv, conv2, deconv, filt, filt!, xcorr
14871487

1488-
# NOTE: rename the function replace_new from strings/util.jl to replace
1489-
# when this replace is removed from deprecated.jl
1488+
# PR #22325
1489+
# TODO: when this replace is removed from deprecated.jl:
1490+
# 1) rename the function replace_new from strings/util.jl to replace
1491+
# 2) update the replace(s::AbstractString, pat, f) method, below replace_new
1492+
# (see instructions there)
14901493
function replace(s::AbstractString, pat, f, n::Integer)
14911494
if n <= 0
14921495
depwarn(string("`replace(s, pat, r, count)` with `count <= 0` is deprecated, use ",

base/strings/util.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ _replace(io, repl, str, r, pattern) = print(io, repl)
358358
_replace(io, repl::Function, str, r, pattern) =
359359
print(io, repl(SubString(str, first(r), last(r))))
360360

361+
# TODO: rename to `replace` when `replace` is removed from deprecated.jl
361362
function replace_new(str::String, pattern, repl, count::Integer)
362-
# rename to `replace` when `replace` is removed from deprecated.jl
363363
count == 0 && return str
364364
count < 0 && throw(DomainError())
365365
n = 1
@@ -405,7 +405,7 @@ If `pat` is a regular expression and `r` is a `SubstitutionString`, then capture
405405
references in `r` are replaced with the corresponding matched text.
406406
"""
407407
replace(s::AbstractString, pat, f) = replace_new(String(s), pat, f, typemax(Int))
408-
# change this to the following when `replace` is removed from deprecated:
408+
# TODO: change this to the following when `replace` is removed from deprecated.jl:
409409
# replace(s::AbstractString, pat, f, count::Integer=typemax(Int)) =
410410
# replace(String(s), pat, f, count)
411411

0 commit comments

Comments
 (0)