Skip to content

Commit

Permalink
Merge pull request #3 from sebskuse/feature/swift_5
Browse files Browse the repository at this point in the history
Swift 5 support
  • Loading branch information
dhardiman authored Apr 25, 2019
2 parents e37f0b0 + 76656f7 commit 681e98d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
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

0 comments on commit 681e98d

Please sign in to comment.