Skip to content

Commit

Permalink
Merge pull request #68 from alickbass/swift-3.1
Browse files Browse the repository at this point in the history
Swift 3.1
  • Loading branch information
wangshengjia committed Apr 24, 2017
2 parents 213cad1 + 1be92c2 commit ac64456
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LeeGo.xcodeproj/project.pbxproj
Expand Up @@ -307,7 +307,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0810;
LastUpgradeCheck = 0830;
ORGANIZATIONNAME = "Victor Wang";
TargetAttributes = {
35F520001C7C73D40089FF41 = {
Expand Down
2 changes: 1 addition & 1 deletion LeeGo.xcodeproj/xcshareddata/xcschemes/LeeGo.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
10 changes: 2 additions & 8 deletions Sources/Core/Appearance.swift
Expand Up @@ -422,13 +422,7 @@ extension Appearance: JSONConvertible {
}

internal static func appearancesWithJSON(_ json: JSONDictionary) -> [Appearance] {
return json.map({
(key, value) -> JSONDictionary in
return [key: value]
}).map({
json -> Appearance in
return Appearance(rawValue: json)
})
return json.lazy.map({ [$0.key: $0.value] }).map({ Appearance(rawValue: $0) })
}

internal init(rawValue json: JSONDictionary?) {
Expand Down Expand Up @@ -646,7 +640,7 @@ extension Appearance: JSONConvertible {
self = .keyboardDismissMode(UIScrollViewKeyboardDismissMode(rawValue: value))

default:
assertionFailure("Can't decode json \(json) to Appearance")
assertionFailure("Can't decode json \(String(describing: json)) to Appearance")
}
}

Expand Down

0 comments on commit ac64456

Please sign in to comment.