@@ -102,23 +102,23 @@ extension BinaryEncoder: Encoder {
102
102
103
103
var codingPath : [ CodingKey ? ] { return [ ] }
104
104
105
- mutating func encode< T> ( _ value: T , forKey key: Key ) throws where T : Encodable {
105
+ func encode< T> ( _ value: T , forKey key: Key ) throws where T : Encodable {
106
106
try encoder. encode ( value)
107
107
}
108
108
109
- mutating func nestedContainer< NestedKey> ( keyedBy keyType: NestedKey . Type , forKey key: Key ) -> KeyedEncodingContainer < NestedKey > where NestedKey : CodingKey {
109
+ func nestedContainer< NestedKey> ( keyedBy keyType: NestedKey . Type , forKey key: Key ) -> KeyedEncodingContainer < NestedKey > where NestedKey : CodingKey {
110
110
return encoder. container ( keyedBy: keyType)
111
111
}
112
112
113
- mutating func nestedUnkeyedContainer( forKey key: Key ) -> UnkeyedEncodingContainer {
113
+ func nestedUnkeyedContainer( forKey key: Key ) -> UnkeyedEncodingContainer {
114
114
return encoder. unkeyedContainer ( )
115
115
}
116
116
117
- mutating func superEncoder( ) -> Encoder {
117
+ func superEncoder( ) -> Encoder {
118
118
return encoder
119
119
}
120
120
121
- mutating func superEncoder( forKey key: Key ) -> Encoder {
121
+ func superEncoder( forKey key: Key ) -> Encoder {
122
122
return encoder
123
123
}
124
124
}
@@ -128,22 +128,22 @@ extension BinaryEncoder: Encoder {
128
128
129
129
var codingPath : [ CodingKey ? ] { return [ ] }
130
130
131
- mutating func nestedContainer< NestedKey> ( keyedBy keyType: NestedKey . Type ) -> KeyedEncodingContainer < NestedKey > where NestedKey : CodingKey {
131
+ func nestedContainer< NestedKey> ( keyedBy keyType: NestedKey . Type ) -> KeyedEncodingContainer < NestedKey > where NestedKey : CodingKey {
132
132
return encoder. container ( keyedBy: keyType)
133
133
}
134
134
135
- mutating func nestedUnkeyedContainer( ) -> UnkeyedEncodingContainer {
135
+ func nestedUnkeyedContainer( ) -> UnkeyedEncodingContainer {
136
136
return self
137
137
}
138
138
139
- mutating func superEncoder( ) -> Encoder {
139
+ func superEncoder( ) -> Encoder {
140
140
return encoder
141
141
}
142
142
143
- mutating func encodeNil( ) throws {
143
+ func encodeNil( ) throws {
144
144
}
145
145
146
- mutating func encode< T> ( _ value: T ) throws where T : Encodable {
146
+ func encode< T> ( _ value: T ) throws where T : Encodable {
147
147
try encoder. encode ( value)
148
148
}
149
149
}
0 commit comments