one guard instead two

This commit is contained in:
Николай Ашанин 2016-09-29 18:43:10 +03:00
parent 17f672737b
commit 16b49f217c
2 changed files with 1 additions and 4 deletions

BIN
LeadKit/.DS_Store vendored

Binary file not shown.

View File

@ -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,