Use Self for internal static access

This commit is contained in:
Danny Moesch 2021-10-07 19:19:56 +02:00
parent 3eea063d61
commit 831ffe2235
3 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ public extension String {
} }
func splitByNewline() -> [String] { func splitByNewline() -> [String] {
split(omittingEmptySubsequences: false) { $0 == "\n" || $0 == "\r\n" }.map(String.init) split(omittingEmptySubsequences: false) { $0 == "\n" || $0 == "\r\n" }.map(Self.init)
} }
} }

View file

@ -41,7 +41,7 @@ public extension UIAlertAction {
let action = UIAlertAction(title: keyID, style: .default, handler: handler) let action = UIAlertAction(title: keyID, style: .default, handler: handler)
selectKeyAlert.addAction(action) selectKeyAlert.addAction(action)
} }
selectKeyAlert.addAction(UIAlertAction.cancelAndPopView(controller: controller)) selectKeyAlert.addAction(Self.cancelAndPopView(controller: controller))
controller.present(selectKeyAlert, animated: true, completion: nil) controller.present(selectKeyAlert, animated: true, completion: nil)
} }
} }

View file

@ -40,7 +40,7 @@ public extension FileManager {
let enumerator = self.enumerator( let enumerator = self.enumerator(
at: directoryURL, at: directoryURL,
includingPropertiesForKeys: prefetchedProperties, includingPropertiesForKeys: prefetchedProperties,
options: FileManager.DirectoryEnumerationOptions(), options: Self.DirectoryEnumerationOptions(),
errorHandler: errorHandler errorHandler: errorHandler
) )
precondition(enumerator != nil) precondition(enumerator != nil)