1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00

Avoid casting Any

This commit is contained in:
Daniel Barber 2019-02-20 08:34:42 -05:00
parent 863c9a7a70
commit 6d97aba32d
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -23,16 +23,12 @@ class PreferencesViewController: NSViewController {
}
}
@IBAction func updateMpdHost(_ sender: Any) {
guard let mpdHostField = sender as? NSTextField else { return }
preferences.mpdHost = mpdHostField.stringValue
@IBAction func updateMpdHost(_ sender: NSTextField) {
preferences.mpdHost = sender.stringValue
}
@IBAction func updateMpdPort(_ sender: Any) {
guard let mpdPortField = sender as? NSTextField else { return }
preferences.mpdPort = mpdPortField.integerValue
@IBAction func updateMpdPort(_ sender: NSTextField) {
preferences.mpdPort = sender.integerValue
}
@IBOutlet var mpdHostField: NSTextField!