chore(linter/swift): add shorthand_optional_binding rule (#3456)

* chore(linter/swift): add `shorthand_optional_binding` rule

* lint code
This commit is contained in:
Krzysztof Moch
2024-01-04 20:16:23 +01:00
committed by GitHub
parent 481cc71eda
commit 2ed3949307
10 changed files with 56 additions and 55 deletions

View File

@@ -98,7 +98,7 @@ class RCTPlayerObserver: NSObject, AVPlayerItemMetadataOutputPushDelegate {
private var _playerViewControllerOverlayFrameObserver: NSKeyValueObservation?
deinit {
if let _handlers = _handlers {
if let _handlers {
NotificationCenter.default.removeObserver(_handlers)
}
}
@@ -206,7 +206,7 @@ class RCTPlayerObserver: NSObject, AVPlayerItemMetadataOutputPushDelegate {
}
func replaceTimeObserverIfSet(_ newUpdateInterval: Float64? = nil) {
if let newUpdateInterval = newUpdateInterval {
if let newUpdateInterval {
_progressUpdateInterval = newUpdateInterval
}
if _timeObserver != nil {