Use commaSeparatedToArray utility everywhere.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jeroen Leenarts
2018-08-16 22:39:08 +02:00
parent 603953a8b8
commit bf3510765a
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ extension Tunnel {
if peer.persistentKeepalive > 0 {
settingsString += "persistent_keepalive_interval=\(peer.persistentKeepalive)\n"
}
if let allowedIPs = peer.allowedIPs?.split(separator: ",") {
if let allowedIPs = peer.allowedIPs?.commaSeparatedToArray() {
allowedIPs.forEach {
settingsString += "allowed_ip=\($0.trimmingCharacters(in: .whitespaces))\n"
}