Revert changing configuration

This commit is contained in:
Igor Kislyuk 2017-11-24 12:36:01 +03:00
parent 85063a40bd
commit 095d716853
2 changed files with 3 additions and 5 deletions

View File

@ -90,7 +90,7 @@ extension NSDictionary {
}
func toSocketConfiguration() -> SocketIOClientConfiguration {
let options = [] as SocketIOClientConfiguration
var options = [] as SocketIOClientConfiguration
for (rawKey, value) in self {
if let key = rawKey as? String, let opt = NSDictionary.keyValueToSocketIOClientOption(key: key, value: value) {

View File

@ -22,9 +22,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
import Foundation
@objc public final class SocketIOClientConfiguration : NSObject, ExpressibleByArrayLiteral, Collection, MutableCollection {
public struct SocketIOClientConfiguration : ExpressibleByArrayLiteral, Collection, MutableCollection {
public typealias Element = SocketIOClientOption
public typealias Index = Array<SocketIOClientOption>.Index
public typealias Generator = Array<SocketIOClientOption>.Iterator
@ -84,7 +82,7 @@ import Foundation
return backingArray.index(after: i)
}
public func insert(_ element: Element, replacing replace: Bool = true) {
public mutating func insert(_ element: Element, replacing replace: Bool = true) {
for i in 0..<backingArray.count where backingArray[i] == element {
guard replace else { return }