Skip to content

Commit 9fd577e

Browse files
committed
Fix compilation on old Swift versions
1 parent fed1d64 commit 9fd577e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/OSLogLogger.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ private extension OSLogLogger {
205205

206206
func prettyMetadataValue(_ v: Logging.Logger.MetadataValue) -> String {
207207
/* We return basically v.description, but dictionary keys are sorted. */
208-
return switch v {
209-
case .string(let str): str.processForLogging(escapingMode: .escapeScalars(asASCII: true, octothorpLevel: nil, showQuotes: true), newLineProcessing: .escape).string
210-
case .array(let array): #"["# + array.map{ prettyMetadataValue($0) }.joined(separator: ", ") + #"]"#
211-
case .dictionary(let dict): #"["# + flatMetadataArray(dict).joined(separator: ", ") + #"]"#
212-
case .stringConvertible(let c): prettyMetadataValue(.string(c.description))
208+
switch v {
209+
case .string(let str): return str.processForLogging(escapingMode: .escapeScalars(asASCII: true, octothorpLevel: nil, showQuotes: true), newLineProcessing: .escape).string
210+
case .array(let array): return #"["# + array.map{ prettyMetadataValue($0) }.joined(separator: ", ") + #"]"#
211+
case .dictionary(let dict): return #"["# + flatMetadataArray(dict).joined(separator: ", ") + #"]"#
212+
case .stringConvertible(let c): return prettyMetadataValue(.string(c.description))
213213
}
214214
}
215215

0 commit comments

Comments
 (0)