Skip to content

Commit 16eccf4

Browse files
committed
looks like there is no need to worry about loss of "if var" after all
1 parent a1501cd commit 16eccf4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

bk2ch02p051ImageAndTraitCollection/ImageAndTraitCollection/MyView.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ class MyView: UIView {
1111
}
1212

1313
override func drawRect(rect: CGRect) {
14-
if let im = self.image { // removed "if var", as this will be abolished soon
15-
var im = im
14+
if var im = self.image {
1615
if let asset = self.image.imageAsset {
1716
let tc = self.traitCollection
1817
im = asset.imageWithTraitCollection(tc)

bk2ch17p700PhotoKitImages/VignettePhotoExtension/PhotoEditingViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class PhotoEditingViewController: UIViewController, PHContentEditingController,
5151

5252
// orientation stuff worked out experimentally; I have no idea if it's right
5353

54-
if let output = self.displayImage, // removed if var, as it will be abolished
54+
if let output = self.displayImage, // removed if var, perhaps unnecessarily but it's clearer without
5555
let orient = self.input?.fullSizeImageOrientation {
5656
var output = output
5757
if self.seg.selectedSegmentIndex == 0 {

0 commit comments

Comments
 (0)