Skip to content

Commit 01dab9d

Browse files
committed
Fix compilation for Swift <5.5
1 parent 2270425 commit 01dab9d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Sources/CLTLogger.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public struct CLTLogger : LogHandler {
5959
Newlines in the metadata themselves are always replaced by \n (and other special characters are escaped too).
6060

6161
For now there is no option to allow multilines metadata. */
62-
public enum MultilineMode : Sendable {
62+
public enum MultilineMode : CLTLogger_Sendable {
6363
/**
6464
The new lines in logs are replaced by the given value, the metadata are printed on the same line as the log.
6565

@@ -94,7 +94,7 @@ public struct CLTLogger : LogHandler {
9494
public static let `default` = Self.disallowMultiline
9595
}
9696

97-
public struct Constants : Sendable {
97+
public struct Constants : CLTLogger_Sendable {
9898

9999
public var logPrefix: String
100100
public var multilineLogPrefix: String

Sources/DummySendable.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Foundation
2+
3+
4+
#if swift(>=5.5)
5+
public protocol CLTLogger_Sendable : Sendable {}
6+
#else
7+
public protocol CLTLogger_Sendable {}
8+
#endif

0 commit comments

Comments
 (0)