Skip to content

Commit f9a15a5

Browse files
committed
Remove a couple of unused variable assignments
1 parent 55d8e8f commit f9a15a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/WordPressKit/Models/RemotePostParameters.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public struct RemotePostUpdateParametersWordPressComEncoder: Encodable {
236236
try container.encodeIfPresent(parameters.excerpt, forKey: .excerpt)
237237
try container.encodeIfPresent(parameters.slug, forKey: .slug)
238238
if let value = parameters.featuredImageID {
239-
if let featuredImageID = value {
239+
if value != nil {
240240
try container.encode(parameters.featuredImageID, forKey: .featuredImageID)
241241
} else {
242242
// Passing `null` doesn't work.
@@ -340,7 +340,7 @@ public struct RemotePostUpdateParametersXMLRPCEncoder: Encodable {
340340
try container.encodeIfPresent(parameters.excerpt, forKey: .excerpt)
341341
try container.encodeIfPresent(parameters.slug, forKey: .slug)
342342
if let value = parameters.featuredImageID {
343-
if let featuredImageID = value {
343+
if value != nil {
344344
try container.encode(parameters.featuredImageID, forKey: .featuredImageID)
345345
} else {
346346
// Passing `null` doesn't work.

0 commit comments

Comments
 (0)