Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.0] Freeze some types for consistency with their inlinable initializers #97

Merged
merged 1 commit into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/DequeModule/Deque+Collection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ extension Deque: Sequence {
// conversions from indices to storage slots.

/// An iterator over the members of a deque.
@frozen
public struct Iterator: IteratorProtocol {
@usableFromInline
internal var _storage: Deque._Storage
Expand Down
1 change: 1 addition & 0 deletions Sources/DequeModule/Deque._Storage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//===----------------------------------------------------------------------===//

extension Deque {
@frozen
@usableFromInline
struct _Storage {
@usableFromInline
Expand Down
1 change: 1 addition & 0 deletions Sources/DequeModule/Deque._UnsafeHandle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//===----------------------------------------------------------------------===//

extension Deque {
@frozen
@usableFromInline
internal struct _UnsafeHandle {
@usableFromInline
Expand Down
1 change: 1 addition & 0 deletions Sources/DequeModule/_DequeBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_fixed_layout
@usableFromInline
internal class _DequeBuffer<Element>: ManagedBuffer<_DequeBufferHeader, Element> {
@inlinable
Expand Down
2 changes: 2 additions & 0 deletions Sources/DequeModule/_UnsafeWrappedBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//
//===----------------------------------------------------------------------===//

@frozen
@usableFromInline
internal struct _UnsafeWrappedBuffer<Element> {
@usableFromInline
Expand Down Expand Up @@ -51,6 +52,7 @@ internal struct _UnsafeWrappedBuffer<Element> {
internal var count: Int { first.count + (second?.count ?? 0) }
}

@frozen
@usableFromInline
internal struct _UnsafeMutableWrappedBuffer<Element> {
@usableFromInline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
extension OrderedSet {
/// An unordered view into an ordered set, providing `SetAlgebra`
/// conformance.
@frozen
public struct UnorderedView {
public typealias Element = OrderedSet.Element

Expand Down