Skip to content

Adopt conditional conformances for dictionary decoding (SE-0143)#200

Merged
ikesyo merged 1 commit intomasterfrom
se-0143-dictionary
May 16, 2018
Merged

Adopt conditional conformances for dictionary decoding (SE-0143)#200
ikesyo merged 1 commit intomasterfrom
se-0143-dictionary

Conversation

@ikesyo
Copy link
Copy Markdown
Owner

@ikesyo ikesyo commented May 16, 2018

Ref: #198

extension ExpressibleByDictionaryLiteral where Value: Decodable {
extension Dictionary: Decodable where Key == String, Value: Decodable {
/// - Throws: DecodeError or an arbitrary ErrorType
public static func decode(_ e: Extractor) throws -> Dictionary<String, Value> {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Syntactic Sugar Violation: Shorthand syntactic sugar should be used, i.e. [String: Int] instead of Dictionary<String, Int>. (syntactic_sugar)

@ikesyo ikesyo force-pushed the se-0143-dictionary branch from 24e53a1 to 8961ad3 Compare May 16, 2018 04:57
@ikesyo ikesyo merged commit a83571a into master May 16, 2018
@ikesyo ikesyo deleted the se-0143-dictionary branch May 16, 2018 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants