Skip to content

Commit

Permalink
Reverting certain swift 4.1 mandatory changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Khalian committed Aug 26, 2018
1 parent 7f3dfc7 commit 49fa5ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
osx_image: xcode9.3
osx_image: xcode9.2
language: objective-c
rvm: 2.2.2
cache: cocoapods
Expand Down
2 changes: 1 addition & 1 deletion Sources/ArrayExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ extension Array where Element: Equatable {

/// EZSE: Returns the indexes of the object
public func indexes(of element: Element) -> [Int] {
return enumerated().compactMap { ($0.element == element) ? $0.offset : nil }
return enumerated().flatMap { ($0.element == element) ? $0.offset : nil }
}

/// EZSE: Returns the last index of the object
Expand Down
4 changes: 2 additions & 2 deletions Sources/EZSwiftFunctions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public struct ez {

/// EZSE: Returns true if its simulator and not a device //TODO: Add to readme
public static var isSimulator: Bool {
#if targetEnvironment(simulator)
#if (arch(i386) || arch(x86_64)) && os(iOS)
return true
#else
return false
Expand All @@ -87,7 +87,7 @@ public struct ez {

/// EZSE: Returns true if its on a device and not a simulator //TODO: Add to readme
public static var isDevice: Bool {
#if targetEnvironment(simulator)
#if (arch(i386) || arch(x86_64)) && os(iOS)
return false
#else
return true
Expand Down

0 comments on commit 49fa5ce

Please sign in to comment.