Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Commit

Permalink
Simplify the runtime.connect generic signatures.
Browse files Browse the repository at this point in the history
Reviewers: O2 Material Motion, O4 Material Apple platform reviewers, #material_motion, chuga

Reviewed By: O4 Material Apple platform reviewers, chuga

Tags: #material_motion

Differential Revision: http://codereview.cc/D2830
  • Loading branch information
Jeff Verkoeyen committed Mar 10, 2017
1 parent d946855 commit ed29bb0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/MotionRuntime.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,8 @@ public final class MotionRuntime {
viewInteractions.append(interaction)
}

public func connect<T, P: ReactivePropertyConvertible>(_ stream: MotionObservable<T>, to property: P) where P.T == T {
write(stream, to: property.asProperty())
}

public func connect<T, P: ReactivePropertyConvertible>(_ fromProperty: ReactiveProperty<T>, to property: P) where P.T == T {
write(fromProperty.asStream(), to: property.asProperty())
public func connect<O: MotionObservableConvertible>(_ stream: O, to property: ReactiveProperty<O.T>) {
write(stream.asStream(), to: property)
}

public func enable(_ interaction: TogglableInteraction, whenAtRest otherInteraction: StatefulInteraction) {
Expand Down

0 comments on commit ed29bb0

Please sign in to comment.