Skip to content

Commit

Permalink
Make value public
Browse files Browse the repository at this point in the history
  • Loading branch information
amirsaam authored Feb 28, 2023
1 parent eec6d8e commit cfbee4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/CodableAny/CodableAny.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
//

public struct CodableAny: Codable {
let value: Any?
public let value: Any?

init<T>(_ value: T?) {
public init<T>(_ value: T?) {
self.value = value
}

Expand All @@ -30,7 +30,7 @@ public struct CodableAny: Codable {
self.value = value
} else {
throw DecodingError.dataCorruptedError(in: container,
debugDescription: "AnyCodable value cannot be decoded")
debugDescription: "CodableAny: Value cannot be Decoded!")
}
}

Expand All @@ -54,7 +54,7 @@ public struct CodableAny: Codable {
default:
throw EncodingError.invalidValue(self.value as Any, EncodingError.Context(
codingPath: container.codingPath,
debugDescription: "AnyCodable value cannot be encoded")
debugDescription: "CodableAny: Value cannot be Encoded!")
)
}
}
Expand Down

0 comments on commit cfbee4e

Please sign in to comment.