Skip to content

Commit 4329a16

Browse files
authored
Merge pull request #5 from devxoul/swift-5.0
Let's Swift 5.0 🚀
2 parents 7c25dbc + 9962037 commit 4329a16

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
osx_image: xcode10
1+
osx_image: xcode10.2
22
language: objective-c
33
sudo: required
44
env:
55
global:
66
- PROJECT="SafeCollection.xcodeproj"
77
- SCHEME="SafeCollection-Package"
8-
- IOS_SDK="iphonesimulator12.0"
8+
- IOS_SDK="iphonesimulator12.2"
99
- MACOS_SDK="macosx10.14"
10-
- TVOS_SDK="appletvsimulator12.0"
11-
- WATCHOS_SDK="watchsimulator5.0"
10+
- TVOS_SDK="appletvsimulator12.2"
11+
- WATCHOS_SDK="watchsimulator5.2"
1212
- FRAMEWORK="SafeCollection"
1313
matrix:
14-
- SDK="$IOS_SDK" TEST=1 DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=12.0"
14+
- SDK="$IOS_SDK" TEST=1 DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=12.2"
1515
- SDK="$MACOS_SDK" TEST=1 DESTINATION="arch=x86_64"
16-
- SDK="$TVOS_SDK" TEST=1 DESTINATION="OS=12.0,name=Apple TV 4K"
17-
- SDK="$WATCHOS_SDK" TEST=0 DESTINATION="OS=5.0,name=Apple Watch Series 4 - 44mm"
16+
- SDK="$TVOS_SDK" TEST=1 DESTINATION="OS=12.2,name=Apple TV 4K"
17+
- SDK="$WATCHOS_SDK" TEST=0 DESTINATION="OS=5.2,name=Apple Watch Series 4 - 44mm"
1818

1919
install:
2020
- eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"

Package.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
// swift-tools-version:4.2
1+
// swift-tools-version:5.0
22

33
import PackageDescription
44

55
let package = Package(
66
name: "SafeCollection",
7+
platforms: [
8+
.macOS(.v10_10), .iOS(.v8), .tvOS(.v9)
9+
],
710
products: [
811
.library(name: "SafeCollection", targets: ["SafeCollection"]),
912
],
1013
targets: [
1114
.target(name: "SafeCollection"),
1215
.testTarget(name: "SafeCollectionTests", dependencies: ["SafeCollection"]),
13-
]
16+
],
17+
swiftLanguageVersions: [.v5]
1418
)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SafeCollection
22

3-
![Swift](https://img.shields.io/badge/Swift-4.2-orange.svg)
3+
![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)
44
[![Build Status](https://travis-ci.org/devxoul/SafeCollection.svg)](https://travis-ci.org/devxoul/SafeCollection)
55
[![CocoaPods](http://img.shields.io/cocoapods/v/SafeCollection.svg)](https://cocoapods.org/pods/SafeCollection)
66
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)

SafeCollection.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Pod::Spec.new do |s|
99
:tag => s.version.to_s }
1010
s.source_files = "Sources/**/*.swift"
1111
s.requires_arc = true
12+
s.swift_version = "5.0"
1213

1314
s.ios.deployment_target = "8.0"
1415
s.osx.deployment_target = "10.9"

Sources/SafeCollection/SafeCollection.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ public struct SafeMutableCollection<C>: MutableCollection where C: MutableCollec
6262
}
6363

6464
public extension Collection {
65-
public var safe: SafeCollection<Self> {
65+
var safe: SafeCollection<Self> {
6666
return .init(self)
6767
}
6868
}
6969

7070
public extension MutableCollection {
71-
public var safe: SafeMutableCollection<Self> {
71+
var safe: SafeMutableCollection<Self> {
7272
get { return .init(self) }
7373
set { self = newValue.collection }
7474
}

0 commit comments

Comments
 (0)