Просмотр исходного кода

fix: no need call empty initializer (#3742)

### Issue Link :link:
<!-- What issue does this fix? If an issue doesn't exist, remove this
section. -->

### Goals :soccer:
<!-- List the high-level objectives of this pull request. -->
<!-- Include any relevant context. -->

### Implementation Details :construction:
<!-- Explain the reasoning behind any architectural changes. -->
<!-- Highlight any new functionality. -->
remove the explicitly call of empty initializer in HTTPHeaders
### Testing Details :mag:
<!-- Describe what tests you've added for your changes. -->
Shinolr 2 лет назад
Родитель
Сommit
f094c2d004
1 измененных файлов с 0 добавлено и 6 удалено
  1. 0 6
      Source/HTTPHeaders.swift

+ 0 - 6
Source/HTTPHeaders.swift

@@ -34,16 +34,12 @@ public struct HTTPHeaders {
     /// Creates an instance from an array of `HTTPHeader`s. Duplicate case-insensitive names are collapsed into the last
     /// name and value encountered.
     public init(_ headers: [HTTPHeader]) {
-        self.init()
-
         headers.forEach { update($0) }
     }
 
     /// Creates an instance from a `[String: String]`. Duplicate case-insensitive names are collapsed into the last name
     /// and value encountered.
     public init(_ dictionary: [String: String]) {
-        self.init()
-
         dictionary.forEach { update(HTTPHeader(name: $0.key, value: $0.value)) }
     }
 
@@ -145,8 +141,6 @@ public struct HTTPHeaders {
 
 extension HTTPHeaders: ExpressibleByDictionaryLiteral {
     public init(dictionaryLiteral elements: (String, String)...) {
-        self.init()
-
         elements.forEach { update(name: $0.0, value: $0.1) }
     }
 }