Skip to content

Commit

Permalink
Avoid using implicit returns for older Swift
Browse files Browse the repository at this point in the history
  • Loading branch information
kkebo committed May 20, 2020
1 parent d5f4d62 commit 84c33e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/XMLCoder/Encoder/XMLEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ open class XMLEncoder {
// MARK: - TopLevelEncoder

open func encode<T>(_ value: T) throws -> Data where T: Encodable {
try encode(value, withRootKey: nil, rootAttributes: nil, header: nil)
return try encode(value, withRootKey: nil, rootAttributes: nil, header: nil)
}
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/XMLCoderTests/CombineTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private struct Foo: Codable {

final class CustomEncoder: XMLEncoder {
override func encode<T>(_ value: T) throws -> Data where T : Encodable {
try self.encode(value, withRootKey: "bar", rootAttributes: nil, header: nil)
return try self.encode(value, withRootKey: "bar", rootAttributes: nil, header: nil)
}
}

Expand Down

0 comments on commit 84c33e7

Please sign in to comment.