Reverting certain swift 4.1 mandatory changes.

This commit is contained in:
Arunav Sanyal 2018-08-25 19:21:49 -07:00 committed by Arunav Sanyal
parent 7f3dfc7278
commit 49fa5ce305
3 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
osx_image: xcode9.3
osx_image: xcode9.2
language: objective-c
rvm: 2.2.2
cache: cocoapods

View File

@ -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

View File

@ -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
@ -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