Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift 3.1 #68

Merged
merged 2 commits into from
Apr 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LeeGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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