Skip to content

Commit e423640

Browse files
authored
Merge pull request #12638 from glessard/umrbp-tweak
[stdlib] use Collection.isEmpty rather than Collection.count
2 parents f53826a + 99e5570 commit e423640

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/UnsafeRawBufferPointer.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ public struct Unsafe${Mutable}RawBufferPointer
467467
_debugPrecondition(bounds.upperBound <= endIndex)
468468
_debugPrecondition(bounds.count == newValue.count)
469469

470-
if newValue.count > 0 {
470+
if !newValue.isEmpty {
471471
(baseAddress! + bounds.lowerBound).copyBytes(
472472
from: newValue.base.baseAddress! + newValue.startIndex,
473473
count: newValue.count)

0 commit comments

Comments
 (0)