Skip to content

Commit b70a9ef

Browse files
author
Gal Shelef
committed
compilation fix - missing try statements for swift <5.5
1 parent 27b6e74 commit b70a9ef

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/OpenTelemetryApi/Common/AttributeValue.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,15 @@ extension AttributeValue: Codable { }
163163
extension AttributeValue: Codable {
164164

165165
public init(from decoder: Decoder) throws {
166-
let explicitDecoded = AttributeValueExplicitCodable(from: decoder)
166+
let explicitDecoded = try AttributeValueExplicitCodable(from: decoder)
167167

168168
self = explicitDecoded.attributeValue
169169
}
170170

171171
public func encode(to encoder: Encoder) throws {
172172
let explicitEncoded = AttributeValueExplicitCodable(attributeValue: self)
173173

174-
explicitEncoded.encode(to: encoder)
174+
try explicitEncoded.encode(to: encoder)
175175
}
176176
}
177177
#endif

Sources/OpenTelemetryApi/Trace/Status.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ extension Status: Codable { }
130130
extension Status: Codable {
131131

132132
public init(from decoder: Decoder) throws {
133-
let explicitDecoded = StatusExplicitCodable(from: decoder)
133+
let explicitDecoded = try StatusExplicitCodable(from: decoder)
134134

135135
self = explicitDecoded.status
136136
}
137137

138138
public func encode(to encoder: Encoder) throws {
139139
let explicitEncoded = StatusExplicitCodable(status: self)
140140

141-
explicitEncoded.encode(to: encoder)
141+
try explicitEncoded.encode(to: encoder)
142142
}
143143
}
144144
#endif

0 commit comments

Comments
 (0)