Skip to content

Commit

Permalink
fix(ios): format new code;
Browse files Browse the repository at this point in the history
  • Loading branch information
mat1th committed Feb 19, 2024
1 parent e1dee8e commit 20a94e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ GEM
PLATFORMS
arm64-darwin-21
arm64-darwin-22
arm64-darwin-23
x86_64-darwin-20
x86_64-darwin-21
x86_64-darwin-22
Expand Down
8 changes: 4 additions & 4 deletions Sources/App/QRCodeScanner/Camera/BarcodeScannerCamera.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class BarcodeScannerCamera: NSObject {

private var captureDevice: AVCaptureDevice? {
didSet {
guard let captureDevice = captureDevice else { return }
guard let captureDevice else { return }

Check warning on line 36 in Sources/App/QRCodeScanner/Camera/BarcodeScannerCamera.swift

View check run for this annotation

Codecov / codecov/patch

Sources/App/QRCodeScanner/Camera/BarcodeScannerCamera.swift#L36

Added line #L36 was not covered by tests
Current.Log.info("Using capture device: \(captureDevice.localizedName)")
sessionQueue.async {
self.updateSessionForCaptureDevice(captureDevice)
Expand Down Expand Up @@ -79,7 +79,7 @@ class BarcodeScannerCamera: NSObject {
}

guard
let captureDevice = captureDevice,
let captureDevice,

Check warning on line 82 in Sources/App/QRCodeScanner/Camera/BarcodeScannerCamera.swift

View check run for this annotation

Codecov / codecov/patch

Sources/App/QRCodeScanner/Camera/BarcodeScannerCamera.swift#L82

Added line #L82 was not covered by tests
let deviceInput = try? AVCaptureDeviceInput(device: captureDevice) else {
Current.Log.error("Failed to obtain video input.")
return
Expand Down Expand Up @@ -199,14 +199,14 @@ class BarcodeScannerCamera: NSObject {
if isCaptureSessionConfigured {
if !captureSession.isRunning {
sessionQueue.async { [self] in
self.captureSession.startRunning()
captureSession.startRunning()

Check warning on line 202 in Sources/App/QRCodeScanner/Camera/BarcodeScannerCamera.swift

View check run for this annotation

Codecov / codecov/patch

Sources/App/QRCodeScanner/Camera/BarcodeScannerCamera.swift#L202

Added line #L202 was not covered by tests
}
}
return
}

sessionQueue.async { [self] in
self.configureCaptureSession { success in
configureCaptureSession { success in

Check warning on line 209 in Sources/App/QRCodeScanner/Camera/BarcodeScannerCamera.swift

View check run for this annotation

Codecov / codecov/patch

Sources/App/QRCodeScanner/Camera/BarcodeScannerCamera.swift#L209

Added line #L209 was not covered by tests
guard success else { return }
self.captureSession.startRunning()
}
Expand Down

0 comments on commit 20a94e1

Please sign in to comment.