Remove unnecessary return statements

This commit is contained in:
Sami Samhuri 2025-06-15 08:18:43 -07:00
parent 4615329e46
commit 863d712e42
No known key found for this signature in database
5 changed files with 10 additions and 10 deletions

View file

@ -121,6 +121,6 @@ public final class FormEncoder: CustomStringConvertible {
} }
public var description: String { public var description: String {
return "FormEncoder" "FormEncoder"
} }
} }

View file

@ -16,10 +16,10 @@ public enum HTTPMethod: String, Sendable, CustomStringConvertible {
/// The uppercased string representation of the HTTP method. /// The uppercased string representation of the HTTP method.
var string: String { var string: String {
return rawValue.uppercased() rawValue.uppercased()
} }
public var description: String { public var description: String {
return string string
} }
} }

View file

@ -141,6 +141,6 @@ public struct HTTPRequest: Sendable, CustomStringConvertible {
} }
public var description: String { public var description: String {
return "<HTTPRequest \(method) \(url)>" "<HTTPRequest \(method) \(url)>"
} }
} }

View file

@ -80,12 +80,12 @@ public enum HTTPResponse: CustomStringConvertible {
/// The HTTP status code returned by the server, or 0 if the request failed completely. /// The HTTP status code returned by the server, or 0 if the request failed completely.
public var status: Int { public var status: Int {
return underlyingResponse?.statusCode ?? 0 underlyingResponse?.statusCode ?? 0
} }
/// All HTTP headers returned by the server. /// All HTTP headers returned by the server.
public var headers: [AnyHashable : Any] { public var headers: [AnyHashable : Any] {
return underlyingResponse?.allHeaderFields ?? [:] underlyingResponse?.allHeaderFields ?? [:]
} }
/// The response body decoded as a UTF-8 string. /// The response body decoded as a UTF-8 string.

View file

@ -40,7 +40,7 @@ extension MultipartFormEncoder {
} }
public var description: String { public var description: String {
return "<BodyData size=\(contentLength)>" "<BodyData size=\(contentLength)>"
} }
} }
@ -57,7 +57,7 @@ extension MultipartFormEncoder {
public let contentLength: Int64 public let contentLength: Int64
public var description: String { public var description: String {
return "<BodyFile file=\(url.lastPathComponent) size=\(contentLength)>" "<BodyFile file=\(url.lastPathComponent) size=\(contentLength)>"
} }
} }
@ -132,7 +132,7 @@ extension MultipartFormEncoder {
} }
public var description: String { public var description: String {
return "<Part name=\(name) content=\(content)>" "<Part name=\(name) content=\(content)>"
} }
} }
} }
@ -361,6 +361,6 @@ public final class MultipartFormEncoder: CustomStringConvertible {
} }
public var description: String { public var description: String {
return "<MultipartFormEncoder boundary=\(boundary)>" "<MultipartFormEncoder boundary=\(boundary)>"
} }
} }