Fixed a difference in the size of the Return and Break Early header. … · github/swift-style-guide@400beff · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 400beff

Browse files
Fixed a difference in the size of the Return and Break Early header. Also removed an extra blank line.
1 parent 9029558 commit 400beff

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ then open a pull request. :zap:
2121
* Don’t leave trailing whitespace.
2222
* Not even leading indentation on blank lines.
2323

24-
2524
#### Prefer `let`-bindings over `var`-bindings wherever possible
2625

2726
Use `let foo = …` over `var foo = …` wherever possible (and when in doubt). Only use `var` if you absolutely have to (i.e. you *know* that the value might change, e.g. when using the `weak` storage modifier).
@@ -34,7 +33,7 @@ It becomes easier to reason about code. Had you used `var` while still making th
3433

3534
Accordingly, whenever you see a `var` identifier being used, assume that it will change and ask yourself why.
3635

37-
### Return and break early
36+
#### Return and break early
3837

3938
When you have to meet certain criteria to continue execution, try to exit early. So, instead of this:
4039

@@ -56,7 +55,6 @@ guard n.isNumber else {
5655

5756
You can also do it with `if` statement, but using `guard` is prefered, because `guard` statement without `return`, `break` or `continue` produces a compile-time error, so exit is guaranteed.
5857

59-
6058
#### Avoid Using Force-Unwrapping of Optionals
6159

6260
If you have an identifier `foo` of type `FooType?` or `FooType!`, don't force-unwrap it to get to the underlying value (`foo!`) if possible.

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.