Skip to content

Commit 00170f0

Browse files
authored
Merge pull request kodecocodes#272 from jawwad/remove-extra-spaces
Remove a few extra spaces
2 parents 2dc39e0 + 59333b2 commit 00170f0

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

README.markdown

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Our overarching goals are clarity, consistency and brevity, in that order.
1111
* [Naming](#naming)
1212
* [Prose](#prose)
1313
* [Delegates](#delegates)
14-
* [Use Type Inferred Context](#use-type-inferred-context)
14+
* [Use Type Inferred Context](#use-type-inferred-context)
1515
* [Generics](#generics)
1616
* [Class Prefixes](#class-prefixes)
1717
* [Language](#language)
@@ -183,7 +183,7 @@ Use extensions to organize your code into logical blocks of functionality. Each
183183

184184
### Protocol Conformance
185185

186-
In particular, when adding protocol conformance to a model, prefer adding a separate extension for the protocol methods. This keeps the related methods grouped together with the protocol and can simplify instructions to add a protocol to a class with its associated methods.
186+
In particular, when adding protocol conformance to a model, prefer adding a separate extension for the protocol methods. This keeps the related methods grouped together with the protocol and can simplify instructions to add a protocol to a class with its associated methods.
187187

188188
**Preferred:**
189189
```swift
@@ -252,8 +252,8 @@ Keep imports minimal. For example, don't import `UIKit` when importing `Foundati
252252

253253
* Indent using 2 spaces rather than tabs to conserve space and help prevent line wrapping. Be sure to set this preference in Xcode and in the Project settings as shown below:
254254

255-
![Xcode indent settings](screens/indentation.png)
256-
255+
![Xcode indent settings](screens/indentation.png)
256+
257257
* Method braces and other braces (`if`/`else`/`switch`/`while` etc.) always open on the same line as the statement but close on a new line.
258258
* Tip: You can re-indent by selecting some code (or ⌘A to select all) and then Control-I (or Editor\Structure\Re-Indent in the menu). Some of the Xcode template code will have 4-space tabs hard coded, so this is a good way to fix that.
259259

@@ -279,7 +279,7 @@ else {
279279

280280
* There should be exactly one blank line between methods to aid in visual clarity and organization. Whitespace within methods should separate functionality, but having too many sections in a method often means you should refactor into several methods.
281281

282-
* Colons always have no space on the left and one space on the right. Exceptions are the ternary operator `? :`, empty dictionary `[:]` and `#selector` syntax for unnamed parameters `(_:)`.
282+
* Colons always have no space on the left and one space on the right. Exceptions are the ternary operator `? :`, empty dictionary `[:]` and `#selector` syntax for unnamed parameters `(_:)`.
283283

284284
**Preferred:**
285285
```swift
@@ -403,7 +403,7 @@ Marking classes or members as `final` in tutorials can distract from the main to
403403
```swift
404404
// Turn any generic type into a reference type using this Box class.
405405
final class Box<T> {
406-
let value: T
406+
let value: T
407407
init(_ value: T) {
408408
self.value = value
409409
}
@@ -687,8 +687,8 @@ Extend object lifetime using the `[weak self]` and `guard let strongSelf = self
687687
**Preferred**
688688
```swift
689689
resource.request().onComplete { [weak self] response in
690-
guard let strongSelf = self else {
691-
return
690+
guard let strongSelf = self else {
691+
return
692692
}
693693
let model = strongSelf.updateModel(response)
694694
strongSelf.updateUI(model)
@@ -787,15 +787,14 @@ When coding with conditionals, the left-hand margin of the code should be the "g
787787
```swift
788788
func computeFFT(context: Context?, inputData: InputData?) throws -> Frequencies {
789789

790-
guard let context = context else {
791-
throw FFTError.noContext
790+
guard let context = context else {
791+
throw FFTError.noContext
792792
}
793-
guard let inputData = inputData else {
794-
throw FFTError.noInputData
793+
guard let inputData = inputData else {
794+
throw FFTError.noInputData
795795
}
796-
796+
797797
// use context and input to compute the frequencies
798-
799798
return frequencies
800799
}
801800
```
@@ -822,10 +821,10 @@ When multiple optionals are unwrapped either with `guard` or `if let`, minimize
822821

823822
**Preferred:**
824823
```swift
825-
guard let number1 = number1,
826-
let number2 = number2,
827-
let number3 = number3 else {
828-
fatalError("impossible")
824+
guard let number1 = number1,
825+
let number2 = number2,
826+
let number3 = number3 else {
827+
fatalError("impossible")
829828
}
830829
// do something with numbers
831830
```
@@ -898,14 +897,14 @@ let playerMark = (player == current ? "X" : "O")
898897

899898
Where an Xcode project is involved, the organization should be set to `Ray Wenderlich` and the Bundle Identifier set to `com.razeware.TutorialName` where `TutorialName` is the name of the tutorial project.
900899

901-
![Xcode Project settings](screens/project_settings.png)
902-
900+
![Xcode Project settings](screens/project_settings.png)
901+
903902
## Copyright Statement
904903

905904
The following copyright statement should be included at the top of every source
906905
file:
907906

908-
```swift
907+
```swift
909908
  /**
910909
    * Copyright (c) 2017 Razeware LLC
911910
*

0 commit comments

Comments
 (0)