Iterable → BorrowingSequence, BorrowIterator → BorrowingIterator

This commit is contained in:
Karoy Lorentey committed 2026-01-25 16:42:37 -08:00
1 parent fabe5d8c87
commit e4aba4c1c9
24 files changed
+287 -187

No files matched your search

@@ -2,7 +2,7 @@
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2024 - 2025 Apple Inc. and the Swift project authors
// Copyright (c) 2024 - 2026 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -98,7 +98,7 @@ extension RigidArray /*where Element: Copyable*/ {
/// The container must not contain more than `capacity` elements.
@_alwaysEmitIntoClient
@inline(__always)
public init<Source: Iterable<Element> & ~Copyable & ~Escapable>(
public init<Source: BorrowingSequence<Element> & ~Copyable & ~Escapable>(
capacity: Int,
copying contents: borrowing Source
) {
@@ -119,7 +119,7 @@ extension RigidArray /*where Element: Copyable*/ {
/// The container must not contain more than `capacity` elements.
@_alwaysEmitIntoClient
@inline(__always)
public init<Source: Iterable<Element> & Sequence<Element>>(
public init<Source: BorrowingSequence<Element> & Sequence<Element>>(
capacity: Int,
copying contents: Source
) {