File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -322,7 +322,8 @@ extension Substring: CustomDebugStringConvertible {
322322
323323extension Substring : LosslessStringConvertible {
324324 public init ( _ content: String ) {
325- self = content [ ... ]
325+ let range = Range ( _uncheckedBounds: ( content. startIndex, content. endIndex) )
326+ self . init ( Slice ( base: content, bounds: range) )
326327 }
327328}
328329
@@ -727,14 +728,14 @@ extension Substring: RangeReplaceableCollection {
727728 public init < S: Sequence > ( _ elements: S )
728729 where S. Element == Character {
729730 if let str = elements as? String {
730- self = str [ ... ]
731+ self . init ( str )
731732 return
732733 }
733734 if let subStr = elements as? Substring {
734735 self = subStr
735736 return
736737 }
737- self = String ( elements) [ ... ]
738+ self . init ( String ( elements) )
738739 }
739740
740741 @inlinable // specialize
You can’t perform that action at this time.
0 commit comments