 import Foundation
 
 fileprivate extension Bool {
-    init?(queryValue: Substring?) {
+    init?(queryValue: String?) {
         switch queryValue {
         case nil:
             return nil

        }

        // Parse all queries
        var queries = [Substring: Substring]()
        queries.reserveCapacity(10)
        
        if let queryString = queryString {
            queryString.split(separator: "&").forEach { queryItem in
                // queryItem can be either like `someOption` or like `someOption=abc`
                let queryItemParts = queryItem.split(separator: "=", maxSplits: 1)
                let queryItemName = queryItemParts[0]
                let queryItemValue = queryItemParts.count > 1 ? queryItemParts[1] : ""

                queries[queryItemName] = queryItemValue
            }
        }
        
        // Parse the authentication details, if included
        if uriContainsAuthenticationDetails {

        self.socketTimeout = socketTimeout
        self.applicationName = applicationName
        self.isSRV = false
        self.queryParameters = [:]
    }

    /// Parses the given `uri` into the ConnectionSettings
