Skip to content

Commit 3c855da

Browse files
[stdlib] Fix coding style of AdditiveArithmetic (swiftlang#75461)
Use explicit access modifiers instead of `public extension` inheritance.
1 parent 96c5d83 commit 3c855da

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/public/core/Integers.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,21 @@ public protocol AdditiveArithmetic: Equatable {
126126
static func -=(lhs: inout Self, rhs: Self)
127127
}
128128

129-
public extension AdditiveArithmetic {
129+
extension AdditiveArithmetic {
130130
@_alwaysEmitIntoClient
131-
static func +=(lhs: inout Self, rhs: Self) {
131+
public static func +=(lhs: inout Self, rhs: Self) {
132132
lhs = lhs + rhs
133133
}
134134

135135
@_alwaysEmitIntoClient
136-
static func -=(lhs: inout Self, rhs: Self) {
136+
public static func -=(lhs: inout Self, rhs: Self) {
137137
lhs = lhs - rhs
138138
}
139139
}
140140

141-
public extension AdditiveArithmetic where Self: ExpressibleByIntegerLiteral {
141+
extension AdditiveArithmetic where Self: ExpressibleByIntegerLiteral {
142142
@inlinable @inline(__always)
143-
static var zero: Self {
143+
public static var zero: Self {
144144
return 0
145145
}
146146
}

0 commit comments

Comments
 (0)