Skip to content

Commit 7c94da9

Browse files
author
Nicholas Maccharoli
committed
[stdlib] Simplify constructor for StringUTF16
1 parent e5a6b22 commit 7c94da9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

stdlib/public/core/StringUTF16.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,7 @@ extension String {
282282
}
283283

284284
internal init(_ _core: _StringCore) {
285-
self._offset = 0
286-
self._length = _core.count
287-
self._core = _core
285+
self.init(_core, offset: 0, length: _core.count)
288286
}
289287

290288
internal init(_ _core: _StringCore, offset: Int, length: Int) {

0 commit comments

Comments
 (0)