Skip to content

Commit

Permalink
Merge pull request #5 from dn-m/oil-up-the-rig
Browse files Browse the repository at this point in the history
Oil up the rig
  • Loading branch information
jsbean authored Nov 19, 2018
2 parents a62ece4 + b1395f6 commit e5df794
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 10 deletions.
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
os:
- osx
- linux
language: generic
sudo: required
dist: trusty
osx_image: xcode9
osx_image: xcode10
install:
- eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
env:
- SWIFT_VERSION=4.2
script:
- swift build
- swift package update
- swift test
after_success:
- git clone https://github.com/dn-m/Documentarian && cd Documentarian
- swift build -c release -Xswiftc -static-stdlib
- cd ../
- Documentarian/.build/Release/Documentarian
13 changes: 11 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,25 @@
"repositoryURL": "https://github.com/dn-m/Math",
"state": {
"branch": "master",
"revision": "d1284e043377c0b924cba2ffa2ab0b9aa9dd246f",
"revision": "075ebb5a934251ed7acbe4feace925ed7e322d0f",
"version": null
}
},
{
"package": "PerformanceTesting",
"repositoryURL": "https://github.com/dn-m/PerformanceTesting",
"state": {
"branch": null,
"revision": "d48417c837b1a029dd9567dfa7b5ee3cfa9a0ec7",
"version": "0.3.0"
}
},
{
"package": "Structure",
"repositoryURL": "https://github.com/dn-m/Structure",
"state": {
"branch": "master",
"revision": "81d894ed931864734c73f9507e5d2f147b40a363",
"revision": "11e920b1b883fe169c5ebb58e6489c0f28e9ad90",
"version": null
}
}
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:4.0
// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
3 changes: 1 addition & 2 deletions Sources/Timeline/Action.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// Created by James Bean on 8/3/17.
//

import Structure
import DataStructures
import Time

Expand Down Expand Up @@ -51,6 +50,6 @@ public class Action {
}

func hasAnyIdentifiers <S> (_ identifiers: S) -> Bool where S: Sequence, S.Element == String {
return identifiers.any(satisfy: hasIdentifier)
return self.identifiers.contains(where: identifiers.contains)
}
}
1 change: 0 additions & 1 deletion Sources/Timeline/Schedule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

import Foundation
import StructureWrapping
import DataStructures
import Time

Expand Down
4 changes: 2 additions & 2 deletions Sources/Timeline/SubSchedule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal class SubSchedule {
private func bump(_ actions: [Action], from offset: Seconds) {
(actions as! [Action.Looping])
.map { action in (offset + action.interval, action) }
.forEach { offset, action in base.safelyAppend(action, toArrayWith: offset) }
.forEach { insert($1, at: $0) }
base[offset] = nil
}
}
Expand Down Expand Up @@ -60,7 +60,7 @@ internal class SubSchedule {

/// Add the given `action` at the given `offset`.
internal func insert(_ action: Action, at offset: Seconds) {
base.safelyAppend(action, toArrayWith: offset)
base.safelyAppend(action, forKey: offset)
}

/// Insert the contents of the given `schedule` into this one.
Expand Down

0 comments on commit e5df794

Please sign in to comment.