From 5fff8d2b7ff7bd4ef4e8bbcc5510a113502ead13 Mon Sep 17 00:00:00 2001 From: Yury Korolev Date: Tue, 3 May 2016 12:05:21 +0300 Subject: [PATCH] Better code formatting --- RxCocoa/Common/Reactive.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/RxCocoa/Common/Reactive.swift b/RxCocoa/Common/Reactive.swift index 5a84ca97..189f8321 100644 --- a/RxCocoa/Common/Reactive.swift +++ b/RxCocoa/Common/Reactive.swift @@ -11,16 +11,16 @@ We can use `Reactive` protocol as customization point for constrained protocol e General pattern would be: -```swift -// 1. Conform SomeType to Reactive protocol -extension SomeType: Reactive {} -// 2. Extend Reactive protocol with constrain on Self -// Read as: Reactive Extension where Self is a SomeType -extension Reactive where Self: SomeType { - // 3. Put any specific reactive extension for SomeType here -} -``` + // 1. Conform SomeType to Reactive protocol + extension SomeType: Reactive {} + + // 2. Extend Reactive protocol with constrain on Self + // Read as: Reactive Extension where Self is a SomeType + extension Reactive where Self: SomeType { + // 3. Put any specific reactive extension for SomeType here + } + With this approach we can have more specialized methods and properties using `Self` and not just specialized on common base type.