tidwall/SwiftWebSocket

Swift4 compile warnings

chadham opened this issue · 1 comments

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.

I'm facing same issue.