Skip to content

Conversation

airspeedswift
Copy link
Member

Implementation for swiftlang/swift-evolution#990

Tests tk

//===----------------------------------------------------------------------===//

/// A collection that supports access to its underlying contiguous storage.
@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)

OSX => macOS (11 times) and in same order as rest of stdlib, for easier find and replace.

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
public protocol ContiguousCollection: Collection
where SubSequence: ContiguousCollection {
/// Calls a closure with a pointer to the array's contiguous storage.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Calls a closure with a pointer to the array's contiguous storage.
/// Calls a closure with a pointer to contiguous storage.

Remove: the array's (also in the proposal).

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
public protocol MutableContiguousCollection: ContiguousCollection, MutableCollection
where SubSequence: MutableContiguousCollection {
/// Calls the given closure with a pointer to the array's mutable contiguous
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Calls the given closure with a pointer to the array's mutable contiguous
/// Calls the given closure with a pointer to mutable contiguous

Remove: the array's (also in the proposal).

/// A collection that supports mutable access to its underlying contiguous
/// storage.
@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
public protocol MutableContiguousCollection: ContiguousCollection, MutableCollection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrap to 80 characters?

extension Slice: ContiguousCollection where Base: ContiguousCollection { }

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
extension Slice: MutableContiguousCollection where Base: MutableContiguousCollection { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrap to 80 characters?

@tkremenek
Copy link
Member

SE-0256 has been rejected during formal Swift Evolution review. Closing this PR.

@tkremenek tkremenek closed this Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants