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 5 support #3

Merged
merged 2 commits into from
Apr 25, 2019
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
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.0
7 changes: 4 additions & 3 deletions Router.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
TargetAttributes = {
0752870E1FB0ABEE00C0D4ED = {
CreatedOnToolsVersion = 9.0.1;
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
075287171FB0ABEE00C0D4ED = {
Expand All @@ -173,6 +173,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 075287051FB0ABEE00C0D4ED;
productRefGroup = 075287101FB0ABEE00C0D4ED /* Products */;
Expand Down Expand Up @@ -387,7 +388,7 @@
PRODUCT_BUNDLE_IDENTIFIER = me.davidhardiman.Router;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -411,7 +412,7 @@
PRODUCT_BUNDLE_IDENTIFIER = me.davidhardiman.Router;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
11 changes: 2 additions & 9 deletions Router/Route.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,10 @@

import Foundation

/// Result returned from a route lookup
///
/// - success: Look up successful. Payload contains the created Destination
/// - failure: Look up unsuccessful. Payload contains the returned error
public enum DestinationResult {
case success(Destination)
case failure(Error)
}
public typealias DestinationResult = Result<Destination, Error>

/// Route describes a conversion from a URL or model object to a destination.
public protocol Route: class {
public protocol Route: AnyObject {
init()

/// Suggested hint for overriding a created destination's hint
Expand Down