Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Sources/_StringProcessing/Algorithms/Algorithms/Replace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ extension RangeReplaceableCollection where SubSequence == Substring {
with replacement: Replacement,
subrange: Range<Index>,
maxReplacements: Int = .max
) -> Self where Replacement.Element == Character {
) -> Self where Replacement.Element == Element {
replacing(
RegexConsumer(regex),
with: replacement,
Expand All @@ -166,7 +166,7 @@ extension RangeReplaceableCollection where SubSequence == Substring {
_ regex: R,
with replacement: Replacement,
maxReplacements: Int = .max
) -> Self where Replacement.Element == Character {
) -> Self where Replacement.Element == Element {
replacing(
regex,
with: replacement,
Expand All @@ -178,7 +178,7 @@ extension RangeReplaceableCollection where SubSequence == Substring {
_ regex: R,
with replacement: Replacement,
maxReplacements: Int = .max
) where Replacement.Element == Character {
) where Replacement.Element == Element {
self = replacing(
regex,
with: replacement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ extension RangeReplaceableCollection where SubSequence == Substring {
with replacement: (_MatchResult<RegexConsumer<R, Substring>>) throws -> Replacement,
subrange: Range<Index>,
maxReplacements: Int = .max
) rethrows -> Self where Replacement.Element == Character {
) rethrows -> Self where Replacement.Element == Element {
try replacing(
RegexConsumer(regex),
with: replacement,
Expand All @@ -92,7 +92,7 @@ extension RangeReplaceableCollection where SubSequence == Substring {
_ regex: R,
with replacement: (_MatchResult<RegexConsumer<R, Substring>>) throws -> Replacement,
maxReplacements: Int = .max
) rethrows -> Self where Replacement.Element == Character {
) rethrows -> Self where Replacement.Element == Element {
try replacing(
regex,
with: replacement,
Expand All @@ -104,7 +104,7 @@ extension RangeReplaceableCollection where SubSequence == Substring {
_ regex: R,
with replacement: (_MatchResult<RegexConsumer<R, Substring>>) throws -> Replacement,
maxReplacements: Int = .max
) rethrows where Replacement.Element == Character {
) rethrows where Replacement.Element == Element {
self = try replacing(
regex,
with: replacement,
Expand Down