Enable SwiftLint rule 'unneeded_parentheses_in_closure_argument' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-05 23:32:43 +02:00 committed by Mingshen Sun
parent 5cca2c30d8
commit ab80e5297e
8 changed files with 13 additions and 13 deletions

View file

@ -67,7 +67,7 @@ class ExtensionViewController: UIViewController, UITableViewDataSource, UITableV
for provider in itemProviders {
// search using the extensionContext inputs
if provider.hasItemConformingToTypeIdentifier(OnePasswordExtensionActions.findLogin) {
provider.loadItem(forTypeIdentifier: OnePasswordExtensionActions.findLogin, options: nil) { (item, _) -> Void in
provider.loadItem(forTypeIdentifier: OnePasswordExtensionActions.findLogin, options: nil) { item, _ -> Void in
let dictionary = item as! NSDictionary
var url: String?
if var urlString = dictionary[OnePasswordExtensionKey.URLStringKey] as? String {
@ -85,7 +85,7 @@ class ExtensionViewController: UIViewController, UITableViewDataSource, UITableV
}
}
} else if provider.hasItemConformingToTypeIdentifier(kUTTypePropertyList as String) {
provider.loadItem(forTypeIdentifier: kUTTypePropertyList as String, options: nil) { (item, _) -> Void in
provider.loadItem(forTypeIdentifier: kUTTypePropertyList as String, options: nil) { item, _ -> Void in
var url: String?
if let dictionary = item as? NSDictionary,
let results = dictionary[NSExtensionJavaScriptPreprocessingResultsKey] as? NSDictionary,
@ -104,7 +104,7 @@ class ExtensionViewController: UIViewController, UITableViewDataSource, UITableV
}
}
} else if provider.hasItemConformingToTypeIdentifier(kUTTypeURL as String) {
provider.loadItem(forTypeIdentifier: kUTTypeURL as String, options: nil) { (item, _) -> Void in
provider.loadItem(forTypeIdentifier: kUTTypeURL as String, options: nil) { item, _ -> Void in
let url = (item as? NSURL)!.host
DispatchQueue.main.async { [weak self] in
self?.extensionAction = .fillBrowser