Skip to content

Commit

Permalink
Small formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
twof authored Sep 17, 2018
1 parent f0a7de4 commit 4098729
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Sources/Mailgun/Mailgun.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public struct Mailgun: MailgunProvider {
case .unknownError:
return "Generic error"
}
}

}
}

/// Error response object
Expand Down Expand Up @@ -129,12 +128,11 @@ public struct Mailgun: MailgunProvider {
let client = try container.make(Client.self)

return client.post(mailgunURL, headers: headers) { req in
try req.content.encode(setup)
}.map(to: Response.self) { (response) in
try self.process(response)
}
try req.content.encode(setup)
}.map(to: Response.self) { (response) in
try self.process(response)
}
}

}

// MARK: Private
Expand Down Expand Up @@ -174,12 +172,11 @@ fileprivate extension Mailgun {
extension Array where Element == Mailgun.Message.FullEmail {

var stringArray: [String] {
return map({ entry -> String in
return map { entry -> String in
guard let name = entry.name else {
return entry.email
}
return "\"\(name) <\(entry.email)>\""
})
}
}

}

0 comments on commit 4098729

Please sign in to comment.