mirror of
https://github.com/apple/swift-collections
synced 2026-11-29 05:14:20 +00:00
Fix initializing a String from a _BString slice
This commit is contained in:
1 file changed
+1
-1
@@ -86,7 +86,7 @@ extension String {
|
||||
|
||||
internal init(_from big: _BString, in range: Range<_BString.Index>) {
|
||||
self.init()
|
||||
guard range._isEmptyUTF8 else {
|
||||
guard !range._isEmptyUTF8 else {
|
||||
// We can safely ignore UTF-16 offsets, as we're rounding down to scalar boundaries
|
||||
// anyway.
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user