Fix 2 SwiftLint errors

This commit is contained in:
Marc Rousavy 2021-02-25 14:03:52 +01:00
parent 84f9709399
commit d05525ad01
2 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@ import Foundation
extension CameraView: AVCaptureMetadataOutputObjectsDelegate { extension CameraView: AVCaptureMetadataOutputObjectsDelegate {
func metadataOutput(_: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from _: AVCaptureConnection) { func metadataOutput(_: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from _: AVCaptureConnection) {
guard metadataObjects.count > 0 else { if metadataObjects.isEmpty {
return return
} }

View File

@ -84,7 +84,8 @@ extension AVCaptureDevice.Format {
return false 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 { if self.autoFocusSystem != avAutoFocusSystem {
return false return false
} }