mirror of
https://github.com/samsonjs/Osiris.git
synced 2026-03-25 08:55:48 +00:00
Remove unnecessary return statements
This commit is contained in:
parent
4615329e46
commit
863d712e42
5 changed files with 10 additions and 10 deletions
|
|
@ -121,6 +121,6 @@ public final class FormEncoder: CustomStringConvertible {
|
|||
}
|
||||
|
||||
public var description: String {
|
||||
return "FormEncoder"
|
||||
"FormEncoder"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ public enum HTTPMethod: String, Sendable, CustomStringConvertible {
|
|||
|
||||
/// The uppercased string representation of the HTTP method.
|
||||
var string: String {
|
||||
return rawValue.uppercased()
|
||||
rawValue.uppercased()
|
||||
}
|
||||
|
||||
public var description: String {
|
||||
return string
|
||||
string
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,6 +141,6 @@ public struct HTTPRequest: Sendable, CustomStringConvertible {
|
|||
}
|
||||
|
||||
public var description: String {
|
||||
return "<HTTPRequest \(method) \(url)>"
|
||||
"<HTTPRequest \(method) \(url)>"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,12 +80,12 @@ public enum HTTPResponse: CustomStringConvertible {
|
|||
|
||||
/// The HTTP status code returned by the server, or 0 if the request failed completely.
|
||||
public var status: Int {
|
||||
return underlyingResponse?.statusCode ?? 0
|
||||
underlyingResponse?.statusCode ?? 0
|
||||
}
|
||||
|
||||
/// All HTTP headers returned by the server.
|
||||
public var headers: [AnyHashable : Any] {
|
||||
return underlyingResponse?.allHeaderFields ?? [:]
|
||||
underlyingResponse?.allHeaderFields ?? [:]
|
||||
}
|
||||
|
||||
/// The response body decoded as a UTF-8 string.
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ extension MultipartFormEncoder {
|
|||
}
|
||||
|
||||
public var description: String {
|
||||
return "<BodyData size=\(contentLength)>"
|
||||
"<BodyData size=\(contentLength)>"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ extension MultipartFormEncoder {
|
|||
public let contentLength: Int64
|
||||
|
||||
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 {
|
||||
return "<Part name=\(name) content=\(content)>"
|
||||
"<Part name=\(name) content=\(content)>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -361,6 +361,6 @@ public final class MultipartFormEncoder: CustomStringConvertible {
|
|||
}
|
||||
|
||||
public var description: String {
|
||||
return "<MultipartFormEncoder boundary=\(boundary)>"
|
||||
"<MultipartFormEncoder boundary=\(boundary)>"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue