Skip to content

Commit

Permalink
Updated for Swift 5.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfmcnally committed Mar 26, 2019
1 parent 361e654 commit 9db2dc1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dwifft.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Pod::Spec.new do |s|
s.author = 'Jack Flintermann'
s.source = { git: 'https://github.com/jflinter/Dwifft.git', tag: s.version }

s.swift_version = '4.2'
s.swift_version = '5.0'

s.ios.deployment_target = '8.0'
s.tvos.deployment_target = '9.0'
Expand Down
4 changes: 2 additions & 2 deletions Dwifft/Dwifft.swift
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,13 @@ public extension Array where Element: Equatable {

/// Deprecated in favor of `Dwifft.diff`.
@available(*, deprecated)
public func diff(_ other: [Element]) -> [DiffStep<Element>] {
func diff(_ other: [Element]) -> [DiffStep<Element>] {
return Dwifft.diff(self, other)
}

/// Deprecated in favor of `Dwifft.apply`.
@available(*, deprecated)
public func apply(_ diff: [DiffStep<Element>]) -> [Element] {
func apply(_ diff: [DiffStep<Element>]) -> [Element] {
return Dwifft.apply(diff: diff, toArray: self)
}

Expand Down
2 changes: 1 addition & 1 deletion Dwifft/SectionedValues.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public extension SectionedValues where Section: Hashable {
/// should be sorted before the second. Used to sort the sections in the returned `SectionedValues`.
/// - sortValues: A function that compares two values, and returns true if the first
/// should be sorted before the second. Used to sort the values in each section of the returned `SectionedValues`.
public init(
init(
values: [Value],
valueToSection: ((Value) -> Section),
sortSections: ((Section, Section) -> Bool),
Expand Down
5 changes: 3 additions & 2 deletions DwifftExample/DwifftExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -521,7 +522,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand Down Expand Up @@ -569,7 +570,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand Down

0 comments on commit 9db2dc1

Please sign in to comment.