diff --git a/ios/CameraView+CodeScanning.swift b/ios/CameraView+CodeScanning.swift index 1ba8976..cc18891 100644 --- a/ios/CameraView+CodeScanning.swift +++ b/ios/CameraView+CodeScanning.swift @@ -11,7 +11,7 @@ import Foundation extension CameraView: AVCaptureMetadataOutputObjectsDelegate { func metadataOutput(_: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from _: AVCaptureConnection) { - guard metadataObjects.count > 0 else { + if metadataObjects.isEmpty { return } diff --git a/ios/Extensions/AVCaptureDevice.Format+matchesFilter.swift b/ios/Extensions/AVCaptureDevice.Format+matchesFilter.swift index d3aa007..9fff7f4 100644 --- a/ios/Extensions/AVCaptureDevice.Format+matchesFilter.swift +++ b/ios/Extensions/AVCaptureDevice.Format+matchesFilter.swift @@ -84,7 +84,8 @@ extension AVCaptureDevice.Format { return false } } - if let autoFocusSystem = filter.value(forKey: "autoFocusSystem") as? String, let avAutoFocusSystem = try? AVCaptureDevice.Format.AutoFocusSystem(withString: autoFocusSystem) { + if let autoFocusSystem = filter.value(forKey: "autoFocusSystem") as? String, + let avAutoFocusSystem = try? AVCaptureDevice.Format.AutoFocusSystem(withString: autoFocusSystem) { if self.autoFocusSystem != avAutoFocusSystem { return false }