File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -228,19 +228,19 @@ extension JSONLogger {
228228 }
229229
230230 private func jsonMetadataValue( _ metadataValue: Logger . MetadataValue ) -> JSON {
231- return switch metadataValue {
232- case let . string( s) : . string( s)
233- case let . array( array) : . array ( array . map ( jsonMetadataValue ( _: ) ) )
234- case let . dictionary( dictionary) : . object( dictionary. mapValues ( jsonMetadataValue ( _: ) ) )
231+ switch metadataValue {
232+ case let . string( s) : return . string( s)
233+ case let . array( array) : return . array ( array . map ( jsonMetadataValue ( _: ) ) )
234+ case let . dictionary( dictionary) : return . object( dictionary. mapValues ( jsonMetadataValue ( _: ) ) )
235235 case let . stringConvertible( s) :
236236 if let ( encoder, decoder) = jsonCodersForStringConvertibles,
237237 let c = s as? any Encodable ,
238238 let data = try ? encoder. encode ( c) ,
239239 let json = try ? decoder. decode ( JSON . self, from: data)
240240 {
241- json
241+ return json
242242 } else {
243- . string( s. description)
243+ return . string( s. description)
244244 }
245245 }
246246
You can’t perform that action at this time.
0 commit comments