[swift][client] reduce unnecessary public api (#12975)

* [swift][client] reduce unnecessary public api

* [swift][client] reduce unnecessary public api
This commit is contained in:
Bruno Coelho 2022-07-23 01:39:34 +01:00 committed by GitHub
parent 08c4a35162
commit c03cf178c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ extension CaseIterableDefaultsLast {
/// Initializes an enum such that if a known raw value is found, then it is decoded.
/// Otherwise the last case is used.
/// - Parameter decoder: A decoder.
public init(from decoder: Decoder) throws {
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(from decoder: Decoder) throws {
if let value = try Self(rawValue: decoder.singleValueContainer().decode(RawValue.self)) {
self = value
} else if let lastValue = Self.allCases.last {

View File

@ -18,7 +18,7 @@ extension CaseIterableDefaultsLast {
/// Initializes an enum such that if a known raw value is found, then it is decoded.
/// Otherwise the last case is used.
/// - Parameter decoder: A decoder.
public init(from decoder: Decoder) throws {
internal init(from decoder: Decoder) throws {
if let value = try Self(rawValue: decoder.singleValueContainer().decode(RawValue.self)) {
self = value
} else if let lastValue = Self.allCases.last {