Skip to content

Commit 7de680a

Browse files
committed
remove @inlinable from everything
1 parent eac3962 commit 7de680a

File tree

16 files changed

+48
-44
lines changed

16 files changed

+48
-44
lines changed

Changelog.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Changelog
22

3-
## 1.2.1
3+
## 1.3.0
44

55
- General documentation improvements (fixing typos and whatnot).
6-
- **Potentially breaking:** Changed `repeat(_:)` to start iteration from 0 instead of 1, to more closely match the behavior of the standard library.
7-
- Issues caused by this should be trivial to fix -- just add 1 to the loop index each time you use it.
6+
7+
### Potentially Breaking Changes
8+
9+
- `repeat(_:)` now starts iteration from 0 instead of 1, to more closely match the behavior of the standard library
10+
- Issues caused by this should be trivial to fix -- just add 1 to the loop index each time you use it
11+
- Removed `@inlinable` from everything -- it doesn't make life any easier
812

913
## 1.2.0
1014

Sources/Rapid/Closures/Closures.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
/// - ``run(with:do:)``
4949
/// - ``configure(_:using:)``
5050
/// - ``<-(_:_:)``
51-
@inlinable public func run<ReturnType>(
51+
public func run<ReturnType>(
5252
closure: () throws -> ReturnType
5353
) rethrows -> ReturnType {
5454
try closure()
@@ -85,7 +85,7 @@
8585
/// - ``run(closure:)``
8686
/// - ``configure(_:using:)``
8787
/// - ``<-(_:_:)``
88-
@inlinable public func run<Value>(
88+
public func run<Value>(
8989
with value: Value,
9090
do closure: (Value) throws -> Void
9191
) rethrows {
@@ -119,7 +119,7 @@
119119
/// - ``run(closure:)``
120120
/// - ``run(with:do:)``
121121
/// - ``<-(_:_:)``
122-
@inlinable public func configure<Value>(
122+
public func configure<Value>(
123123
_ value: Value,
124124
using closure: (inout Value) throws -> Void
125125
) rethrows -> Value {
@@ -155,7 +155,7 @@ infix operator <-
155155
/// - ``run(closure:)``
156156
/// - ``run(with:do:)``
157157
/// - ``configure(_:using:)``
158-
@inlinable public func <- <Value>(
158+
public func <- <Value>(
159159
_ value: Value,
160160
closure: (inout Value) throws -> Void
161161
) rethrows -> Value {

Sources/Rapid/Closures/ForEach.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public extension BinaryInteger where Stride: SignedInteger {
4646
/// subsequent calls.
4747
///
4848
/// - Parameter body: A closure that takes an instance of `Self` as a parameter.
49-
@inlinable func `repeat`(_ body: (Self) throws -> Void) rethrows {
49+
func `repeat`(_ body: (Self) throws -> Void) rethrows {
5050
try (0..<self).forEach(body)
5151
}
5252
}

Sources/Rapid/Comparable/Between.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public extension Comparable {
2929
///
3030
/// - Returns: `true` if this value is contained within `range`;
3131
/// otherwise, `false`.
32-
@inlinable func isBetween(_ range: ClosedRange<Self>) -> Bool {
32+
func isBetween(_ range: ClosedRange<Self>) -> Bool {
3333
range.contains(self)
3434
}
3535
}

Sources/Rapid/Numbers/EvenOdd.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public extension BinaryInteger {
3131
/// ## See Also
3232
///
3333
/// ``isOdd``
34-
@inlinable var isEven: Bool {
34+
var isEven: Bool {
3535
isMultiple(of: 2)
3636
}
3737

@@ -51,7 +51,7 @@ public extension BinaryInteger {
5151
/// ## See Also
5252
///
5353
/// ``isEven``
54-
@inlinable var isOdd: Bool {
54+
var isOdd: Bool {
5555
!isEven
5656
}
5757
}

Sources/Rapid/Numbers/Signs.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public extension SignedNumeric where Self: Comparable {
2525
/// ## See Also
2626
///
2727
/// ``isNegative``
28-
@inlinable var isPositive: Bool {
28+
var isPositive: Bool {
2929
self > 0
3030
}
3131

@@ -39,7 +39,7 @@ public extension SignedNumeric where Self: Comparable {
3939
/// ## See Also
4040
///
4141
/// ``isPositive``
42-
@inlinable var isNegative: Bool {
42+
var isNegative: Bool {
4343
self < 0
4444
}
4545

@@ -57,7 +57,7 @@ public extension SignedNumeric where Self: Comparable {
5757
/// let y = x.absoluteValue
5858
/// // Overflow error
5959
/// ```
60-
@inlinable var absoluteValue: Self {
60+
var absoluteValue: Self {
6161
abs(self)
6262
}
6363
}

Sources/Rapid/Numbers/Zero.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public extension AdditiveArithmetic {
2121
/// ## See Also
2222
///
2323
/// ``isNonzero``
24-
@inlinable var isZero: Bool {
24+
var isZero: Bool {
2525
self == .zero
2626
}
2727

@@ -31,7 +31,7 @@ public extension AdditiveArithmetic {
3131
/// ## See Also
3232
///
3333
/// ``isZero``
34-
@inlinable var isNonzero: Bool {
34+
var isNonzero: Bool {
3535
!isZero
3636
}
3737
}

Sources/Rapid/Operators/Aliases.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public extension Equatable {
2929
/// - rhs: Another value to compare.
3030
///
3131
/// - Returns: Whether the two values are not equal.
32-
@inlinable static func (lhs: Self, rhs: Self) -> Bool {
32+
static func (lhs: Self, rhs: Self) -> Bool {
3333
lhs != rhs
3434
}
3535
}
@@ -49,7 +49,7 @@ public extension Comparable {
4949
///
5050
/// - Returns: Whether the first value is less than or equal to the
5151
/// second.
52-
@inlinable static func (lhs: Self, rhs: Self) -> Bool {
52+
static func (lhs: Self, rhs: Self) -> Bool {
5353
lhs <= rhs
5454
}
5555

@@ -62,7 +62,7 @@ public extension Comparable {
6262
///
6363
/// - Returns: Whether the first value is greater than or equal to
6464
/// the second.
65-
@inlinable static func (lhs: Self, rhs: Self) -> Bool {
65+
static func (lhs: Self, rhs: Self) -> Bool {
6666
lhs >= rhs
6767
}
6868
}

Sources/Rapid/Operators/Swap.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ infix operator <=>: AssignmentPrecedence
2525
/// - Parameters:
2626
/// - a: The first value to swap.
2727
/// - b: The second value to swap.
28-
@inlinable public func <=> <Value>(_ a: inout Value, _ b: inout Value) {
28+
public func <=> <Value>(_ a: inout Value, _ b: inout Value) {
2929
swap(&a, &b)
3030
}

Sources/Rapid/Optionals/IsNil.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public extension Optional {
2323
/// ``isNotNil``
2424
/// ``isNilOrEmpty``
2525
/// ``isNotNilOrEmpty``
26-
@inlinable var isNil: Bool {
26+
var isNil: Bool {
2727
self == nil
2828
}
2929

@@ -34,7 +34,7 @@ public extension Optional {
3434
/// ``isNil``
3535
/// ``isNilOrEmpty``
3636
/// ``isNotNilOrEmpty``
37-
@inlinable var isNotNil: Bool {
37+
var isNotNil: Bool {
3838
!isNil
3939
}
4040
}

0 commit comments

Comments
 (0)