From 16b49f217c5d6ca936078eb505b46f1ebdfa53bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B8=CC=86=20=D0=90?= =?UTF-8?q?=D1=88=D0=B0=D0=BD=D0=B8=D0=BD?= Date: Thu, 29 Sep 2016 18:43:10 +0300 Subject: [PATCH] one guard instead two --- LeadKit/.DS_Store | Bin 6148 -> 6148 bytes .../Extensions/UIImage/UIImage+Resize.swift | 5 +---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/LeadKit/.DS_Store b/LeadKit/.DS_Store index e29d9bc7fa2d6bf65c700df38a516462566607cf..496be19f5214dce728046942e8b309a09cd5a4e7 100644 GIT binary patch delta 18 ZcmZoMXffE}$jBHuc^#wL<_yL;VgNc01?vC+ delta 18 ZcmZoMXffE}$jF#Bc^#wL<_yL;VgNdj1^55} diff --git a/LeadKit/LeadKit/Extensions/UIImage/UIImage+Resize.swift b/LeadKit/LeadKit/Extensions/UIImage/UIImage+Resize.swift index c0ef7b22..f2efac47 100644 --- a/LeadKit/LeadKit/Extensions/UIImage/UIImage+Resize.swift +++ b/LeadKit/LeadKit/Extensions/UIImage/UIImage+Resize.swift @@ -68,10 +68,7 @@ public extension UIImage { CGContextSetInterpolationQuality(context, interpolationQuality) CGContextDrawImage(context, rect, CGImage) - guard let newContext = context else { - return nil - } - guard let cgImage = CGBitmapContextCreateImage(newContext) else { + guard let newContext = context, cgImage = CGBitmapContextCreateImage(newContext) else { return nil } return UIImage(CGImage: cgImage,