tidwall / SwiftWebSocket

Fast Websockets in Swift for iOS and OSX
MIT License
1.53k stars 244 forks source link

Swift4 compile warnings #118

Open chadham opened 6 years ago

chadham commented 6 years ago

1027 var path = CFURLCopyPath(req.url! as CFURL!) as String //Using '!' in this location is deprecated and will be removed in a future release; consider changing this to '?' instead

1061 CFStreamCreatePairWithSocketToHost(nil, addr[0] as CFString!, UInt32(Int(addr[1])!), &readStream, &writeStream); //; is not needed //Using '!' in this location is deprecated and will be removed in a future release; consider changing this to '?' instead

1147 key = trim(line.substring(to: r.lowerBound)) // 'substring(to:)' is deprecated: Please use String slicing subscript with a 'partial range upto' operator.

1148 value = trim(line.substring(from: r.upperBound)) //'substring(from:)' is deprecated: Please use String slicing subscript with a 'partial range from' operator.

yusufonderd commented 6 years ago

I'm facing same issue.