Skip to content

Commit

Permalink
fix typos using misspell
Browse files Browse the repository at this point in the history
This PR is part of a campaign to fix a lot of typos on github using https://github.com/client9/misspell!
You can see the progress on https://github.com/fixTypos/fix_typos/
  • Loading branch information
Lutzifer authored and kzaher committed May 20, 2017
1 parent f74657c commit 2e3eb4d
Show file tree
Hide file tree
Showing 32 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion Documentation/Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ All of the operators used in this example are the same operators used in the fir
If you are new to Rx, the next example will probably be a little overwhelming at first. However, it's here to demonstrate how RxSwift code looks in the real-world.

This example contains complex async UI validation logic with progress notifications.
All operations are cancelled the moment `disposeBag` is deallocated.
All operations are canceled the moment `disposeBag` is deallocated.

Let's give it a shot.

Expand Down
2 changes: 1 addition & 1 deletion Documentation/UnitTests.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func testMap_Range() {
let scheduler = TestScheduler(initialClock: 0)

// Creates a mock hot observable sequence.
// The sequence will emit events at desginated
// The sequence will emit events at designated
// times, no matter if there are observers subscribed or not.
// (that's what hot means).
// This observable sequence will also record all subscriptions
Expand Down
6 changes: 3 additions & 3 deletions Documentation/Why.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ NotificationCenter.default

There are also a lot of problems with transient state when writing async programs. A typical example is an autocomplete search box.

If you were to write the autocomplete code without Rx, the first problem that probably needs to be solved is when `c` in `abc` is typed, and there is a pending request for `ab`, the pending request gets cancelled. OK, that shouldn't be too hard to solve, you just create an additional variable to hold reference to the pending request.
If you were to write the autocomplete code without Rx, the first problem that probably needs to be solved is when `c` in `abc` is typed, and there is a pending request for `ab`, the pending request gets canceled. OK, that shouldn't be too hard to solve, you just create an additional variable to hold reference to the pending request.

The next problem is if the request fails, you need to do that messy retry logic. But OK, a couple more fields that capture the number of retries that need to be cleaned up.

Expand Down Expand Up @@ -158,9 +158,9 @@ There are no additional flags or fields required. Rx takes care of all that tran

Let's assume that there is a scenario where you want to display blurred images in a table view. First, the images should be fetched from a URL, then decoded and then blurred.

It would also be nice if that entire process could be cancelled if a cell exits the visible table view area since bandwidth and processor time for blurring are expensive.
It would also be nice if that entire process could be canceled if a cell exits the visible table view area since bandwidth and processor time for blurring are expensive.

It would also be nice if we didn't just immediately start to fetch an image once the cell enters the visible area since, if user swipes really fast, there could be a lot of requests fired and cancelled.
It would also be nice if we didn't just immediately start to fetch an image once the cell enters the visible area since, if user swipes really fast, there could be a lot of requests fired and canceled.

It would be also nice if we could limit the number of concurrent image operations because, again, blurring images is an expensive operation.

Expand Down
2 changes: 1 addition & 1 deletion RxCocoa/Foundation/URLSession+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fileprivate func convertResponseToString(_ response: URLResponse?, _ error: NSEr

if let error = error {
if error.domain == NSURLErrorDomain && error.code == NSURLErrorCancelled {
return "Cancelled (\(ms)ms)"
return "Canceled (\(ms)ms)"
}
return "Failure (\(ms)ms): NSError > \(error)"
}
Expand Down
2 changes: 1 addition & 1 deletion RxCocoa/Runtime/include/_RX.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

/**
Checks that the local `error` instance exists before assigning it's value by reference.
This macro exists to work around static analysis warnings — `NSError` is always assumed to be `nullable`, even though we explictly define the method parameter as `nonnull`. See http://www.openradar.me/21766176 for more details.
This macro exists to work around static analysis warnings — `NSError` is always assumed to be `nullable`, even though we explicitly define the method parameter as `nonnull`. See http://www.openradar.me/21766176 for more details.
*/
#define RX_THROW_ERROR(errorValue, returnValue) if (error != nil) { *error = (errorValue); } return (returnValue);

Expand Down
6 changes: 3 additions & 3 deletions RxCocoa/Traits/Driver/Driver+Subscription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import RxSwift
private let driverErrorMessage = "`drive*` family of methods can be only called from `MainThread`.\n" +
"This is required to ensure that the last replayed `Driver` element is delivered on `MainThread`.\n"

// This would ideally be Driver, but unfortunatelly Driver can't be extended in Swift 3.0
// This would ideally be Driver, but unfortunately Driver can't be extended in Swift 3.0
extension SharedSequenceConvertibleType where SharingStrategy == DriverSharingStrategy {
/**
Creates new subscription and sends elements to observer.
Expand Down Expand Up @@ -110,9 +110,9 @@ extension SharedSequenceConvertibleType where SharingStrategy == DriverSharingSt
- parameter onNext: Action to invoke for each element in the observable sequence.
- parameter onCompleted: Action to invoke upon graceful termination of the observable sequence.
gracefully completed, errored, or if the generation is cancelled by disposing subscription)
gracefully completed, errored, or if the generation is canceled by disposing subscription)
- parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has
gracefully completed, errored, or if the generation is cancelled by disposing subscription)
gracefully completed, errored, or if the generation is canceled by disposing subscription)
- returns: Subscription object used to unsubscribe from the observable sequence.
*/
public func drive(onNext: ((E) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) -> Disposable {
Expand Down
2 changes: 1 addition & 1 deletion RxCocoa/Traits/Driver/Driver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- it delivers events on `MainScheduler.instance`
- `shareReplayLatestWhileConnected()` behavior
- all observers share sequence computation resources
- it's stateful, upon subscription (calling subscribe) last element is immediatelly replayed if it was produced
- it's stateful, upon subscription (calling subscribe) last element is immediately replayed if it was produced
- computation of elements is reference counted with respect to the number of observers
- if there are no subscribers, it will release sequence computation resources
Expand Down
2 changes: 1 addition & 1 deletion RxCocoa/iOS/UICollectionView+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ extension Reactive where Base: UICollectionView {
return ControlEvent(events: source)
}

/// Syncronous helper method for retrieving a model at indexPath through a reactive data source
/// Synchronous helper method for retrieving a model at indexPath through a reactive data source
public func model<T>(at indexPath: IndexPath) throws -> T {
let dataSource: SectionedViewDataSourceType = castOrFatalError(self.dataSource.forwardToDelegate(), message: "This method only works in case one of the `rx.itemsWith*` methods was used.")

Expand Down
2 changes: 1 addition & 1 deletion RxCocoa/iOS/UITableView+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ extension Reactive where Base: UITableView {
Binds sequences of elements to table view rows using a custom reactive data used to perform the transformation.
This method will retain the data source for as long as the subscription isn't disposed (result `Disposable`
being disposed).
In case `source` observable sequence terminates sucessfully, the data source will present latest element
In case `source` observable sequence terminates successfully, the data source will present latest element
until the subscription isn't disposed.
- parameter dataSource: Data source used to transform elements to view cells.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import class Foundation.JSONSerialization
import class Foundation.NSString

/**
Parsed GitHub respository.
Parsed GitHub repository.
*/
struct Repository: CustomDebugStringConvertible {
var name: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</activityIndicatorView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JaL-lO-u4e">
<rect key="frame" x="24" y="294" width="327" height="143.5"/>
<string key="text">Proving that observable sequences have wanted properties (UIThread, errors handled, sharing of side effects) is done manually. (but has some performance gain that shouldn't be noticable in practice)
<string key="text">Proving that observable sequences have wanted properties (UIThread, errors handled, sharing of side effects) is done manually. (but has some performance gain that shouldn't be noticeable in practice)

To do this automatically, check out the corresponding `Driver` example.</string>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</activityIndicatorView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hIR-9t-sq4">
<rect key="frame" x="24" y="294" width="327" height="161.5"/>
<string key="text">Proving that observable sequences have wanted properties (UIThread, errors handled, sharing of side effects) is done automatically by `Driver`. (it is little slower then vanilla observables, but that shouldn't be noticable in practice)
<string key="text">Proving that observable sequences have wanted properties (UIThread, errors handled, sharing of side effects) is done automatically by `Driver`. (it is little slower then vanilla observables, but that shouldn't be noticeable in practice)

Check out the same example using vanilla observable sequences.</string>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
Expand Down
2 changes: 1 addition & 1 deletion RxExample/RxExample/Services/ImageService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class DefaultImageService: ImageService {
In case there were some problems with network connectivity and image wasn't downloaded, automatic retry will be fired when networks becomes
available.
After image is sucessfully downloaded, sequence is completed.
After image is successfully downloaded, sequence is completed.
*/
func imageFromURL(_ url: URL, reachabilityService: ReachabilityService) -> Observable<DownloadableImage> {
return _imageFromURL(url)
Expand Down
2 changes: 1 addition & 1 deletion RxExample/RxExample/Services/Reachability.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public extension Reachability {
throw ReachabilityError.unableToSetDispatchQueue
}

// Perform an intial check
// Perform an initial check
reachabilitySerialQueue.async {
self.reachabilityChanged()
}
Expand Down
6 changes: 3 additions & 3 deletions RxSwift/Errors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let RxCompositeFailures = "RxCompositeFailures"
public enum RxError
: Swift.Error
, CustomDebugStringConvertible {
/// Unknown error occured.
/// Unknown error occurred.
case unknown
/// Performing an action on disposed object.
case disposed(object: AnyObject)
Expand All @@ -34,11 +34,11 @@ extension RxError {
public var debugDescription: String {
switch self {
case .unknown:
return "Unknown error occured."
return "Unknown error occurred."
case .disposed(let object):
return "Object `\(object)` was already disposed."
case .overflow:
return "Arithmetic overflow occured."
return "Arithmetic overflow occurred."
case .argumentOutOfRange:
return "Argument out of range."
case .noElements:
Expand Down
2 changes: 1 addition & 1 deletion RxSwift/ImmediateSchedulerType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// Represents an object that immediately schedules units of work.
public protocol ImmediateSchedulerType {
/**
Schedules an action to be executed immediatelly.
Schedules an action to be executed immediately.
- parameter state: State passed to the action to be executed.
- parameter action: Action to be executed.
Expand Down
4 changes: 2 additions & 2 deletions RxSwift/ObservableType+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extension ObservableType {
- parameter onError: Action to invoke upon errored termination of the observable sequence.
- parameter onCompleted: Action to invoke upon graceful termination of the observable sequence.
- parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has
gracefully completed, errored, or if the generation is cancelled by disposing subscription).
gracefully completed, errored, or if the generation is canceled by disposing subscription).
- returns: Subscription object used to unsubscribe from the observable sequence.
*/
public func subscribe(file: String = #file, line: UInt = #line, function: String = #function, onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil)
Expand Down Expand Up @@ -74,7 +74,7 @@ extension ObservableType {
- parameter onError: Action to invoke upon errored termination of the observable sequence.
- parameter onCompleted: Action to invoke upon graceful termination of the observable sequence.
- parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has
gracefully completed, errored, or if the generation is cancelled by disposing subscription).
gracefully completed, errored, or if the generation is canceled by disposing subscription).
- returns: Subscription object used to unsubscribe from the observable sequence.
*/
public func subscribe(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil)
Expand Down
2 changes: 1 addition & 1 deletion RxSwift/ObservableType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public protocol ObservableType : ObservableConvertibleType {
When sequence sends `Complete` or `Error` event all internal resources that compute sequence elements
will be freed.
To cancel production of sequence elements and free resources immediatelly, call `dispose` on returned
To cancel production of sequence elements and free resources immediately, call `dispose` on returned
subscription.
- returns: Subscription for `observer` that can be used to cancel production of sequence elements and free resources.
Expand Down
2 changes: 1 addition & 1 deletion RxSwift/Observables/Delay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ final fileprivate class DelaySink<O: ObserverType>
}

// All of these complications in this method are caused by the fact that
// error should be propagated immediatelly. Error can bepotentially received on different
// error should be propagated immediately. Error can be potentially received on different
// scheduler so this process needs to be synchronized somehow.
//
// Another complication is that scheduler is potentially concurrent so internal queue is used.
Expand Down
2 changes: 1 addition & 1 deletion RxSwift/Observables/Sequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension Observable {
- seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html)
- parameter elements: Elements to generate.
- parameter scheduler: Scheduler to send elements on. If `nil`, elements are sent immediatelly on subscription.
- parameter scheduler: Scheduler to send elements on. If `nil`, elements are sent immediately on subscription.
- returns: The observable sequence whose elements are pulled from the given arguments.
*/
public static func of(_ elements: E ..., scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable<E> {
Expand Down
2 changes: 1 addition & 1 deletion RxSwift/ObserverType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public protocol ObserverType {

/// Notify observer about sequence event.
///
/// - parameter event: Event that occured.
/// - parameter event: Event that occurred.
func on(_ event: Event<E>)
}

Expand Down
2 changes: 1 addition & 1 deletion RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class ConcurrentDispatchQueueScheduler: SchedulerType {
}

/**
Schedules an action to be executed immediatelly.
Schedules an action to be executed immediately.
- parameter state: State passed to the action to be executed.
- parameter action: Action to be executed.
Expand Down
2 changes: 1 addition & 1 deletion RxSwift/Schedulers/ConcurrentMainScheduler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public final class ConcurrentMainScheduler : SchedulerType {
public static let instance = ConcurrentMainScheduler(mainScheduler: MainScheduler.instance)

/**
Schedules an action to be executed immediatelly.
Schedules an action to be executed immediately.
- parameter state: State passed to the action to be executed.
- parameter action: Action to be executed.
Expand Down
2 changes: 1 addition & 1 deletion RxSwift/Schedulers/ImmediateScheduler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ private final class ImmediateScheduler : ImmediateSchedulerType {
private let _asyncLock = AsyncLock<AnonymousInvocable>()

/**
Schedules an action to be executed immediatelly.
Schedules an action to be executed immediately.
In case `schedule` is called recursively from inside of `action` callback, scheduled `action` will be enqueued
and executed after current `action`. (`AsyncLock` behavior)
Expand Down
2 changes: 1 addition & 1 deletion RxSwift/Schedulers/SchedulerServices+Emulation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final class SchedulePeriodicRecursive<State> {
case .tick:
scheduler.schedule(.tick, dueTime: _period)

// The idea is that if on tick there wasn't any item enqueued, schedule to perform work immediatelly.
// The idea is that if on tick there wasn't any item enqueued, schedule to perform work immediately.
// Else work will be scheduled after previous enqueued work completes.
if AtomicIncrement(&_pendingTickCount) == 1 {
self.tick(.dispatchStart, scheduler: scheduler)
Expand Down
2 changes: 1 addition & 1 deletion RxSwift/Schedulers/SerialDispatchQueueScheduler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public class SerialDispatchQueueScheduler : SchedulerType {
}

/**
Schedules an action to be executed immediatelly.
Schedules an action to be executed immediately.
- parameter state: State passed to the action to be executed.
- parameter action: Action to be executed.
Expand Down
2 changes: 1 addition & 1 deletion RxSwift/Schedulers/VirtualTimeScheduler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
}

/**
Schedules an action to be executed immediatelly.
Schedules an action to be executed immediately.
- parameter state: State passed to the action to be executed.
- parameter action: Action to be executed.
Expand Down
2 changes: 1 addition & 1 deletion RxTest/TestableObserver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public final class TestableObserver<ElementType>

/// Notify observer about sequence event.
///
/// - parameter event: Event that occured.
/// - parameter event: Event that occurred.
public func on(_ event: Event<Element>) {
events.append(Recorded(time: _scheduler.clock, value: event))
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/RxCocoaRuntime/include/_RX.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

/**
Checks that the local `error` instance exists before assigning it's value by reference.
This macro exists to work around static analysis warnings — `NSError` is always assumed to be `nullable`, even though we explictly define the method parameter as `nonnull`. See http://www.openradar.me/21766176 for more details.
This macro exists to work around static analysis warnings — `NSError` is always assumed to be `nullable`, even though we explicitly define the method parameter as `nonnull`. See http://www.openradar.me/21766176 for more details.
*/
#define RX_THROW_ERROR(errorValue, returnValue) if (error != nil) { *error = (errorValue); } return (returnValue);

Expand Down
Loading

0 comments on commit 2e3eb4d

Please sign in to comment.