Skip to content

Commit

Permalink
Merge branch 'RemoveCommandLine'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikun committed Nov 13, 2020
2 parents 8d087fd + fd009c9 commit 948ebe8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Source/Attributes/AlterCodingKeys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ extension Happy {
self.codingKeys = codingKeys
}

public init(wrappedValue creater: @escaping @autoclosure () -> T) {
(T.self as? CodingKeysFilter.Type)?.precondition()

self.constructor = creater
self.codingKeys = []
}

public init<Wrapped>(_ codingKeys: String...) where T == Wrapped? {
(T.self as? CodingKeysFilter.Type)?.precondition()

Expand Down
2 changes: 1 addition & 1 deletion Source/Attributes/NonConformingFloatStrategy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extension Happy {
storage = newValue
}
}
public init(wrappedValue constructor: @escaping @autoclosure () -> Float, decode: Foundation.JSONDecoder.NonConformingFloatDecodingStrategy, encode: Foundation.JSONEncoder.NonConformingFloatEncodingStrategy) {
public init(wrappedValue constructor: @escaping @autoclosure () -> Float, decode: Foundation.JSONDecoder.NonConformingFloatDecodingStrategy = .throw, encode: Foundation.JSONEncoder.NonConformingFloatEncodingStrategy = .throw) {
self.constructor = constructor
self.encodeStrategy = encode
self.decodeStrategy = decode
Expand Down

0 comments on commit 948ebe8

Please sign in to comment.