Skip to content

Commit

Permalink
WIP: remove child map (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBallmann authored Jun 10, 2021
1 parent 2f9ce82 commit 91775cf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/Extensions/SwiftCBOR.CBOR.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ extension SwiftCBOR.CBOR {
switch self {
case let .byteString(val):
let fallBack = "[" + val.map { "\($0)" }.joined(separator: ", ") + "]"
if
let child = try? SwiftCBOR.CBOR.decode(val),
case .map(_) = child
{
return child.toString()
}
// if
// let child = try? SwiftCBOR.CBOR.decode(val),
// case .map(_) = child
// {
// return child.toString()
// }
return fallBack
case let .unsignedInt(val):
return "\(val)"
Expand Down

0 comments on commit 91775cf

Please sign in to comment.