Skip to content

Commit

Permalink
Swift format changes since upgrading to v0.47.13
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed May 3, 2021
1 parent 842c986 commit 0ff4dd6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The main development branch of the repository is `main`. Each major version rel

### Formatting

We use Nick Lockwood's SwiftFormat for formatting code. PRs will not be accepted if they haven't be formatted. The current version of SwiftFormat we are using is v0.47.4.
We use Nick Lockwood's SwiftFormat for formatting code. PRs will not be accepted if they haven't be formatted. The current version of SwiftFormat we are using is v0.47.13.

All new files need to include the following file header at the top
```swift
Expand Down
2 changes: 1 addition & 1 deletion Sources/SotoCore/AWSClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ extension AWSClient {

// invoker
extension AWSClient {
fileprivate func invoke<Output>(
private func invoke<Output>(
with serviceConfig: AWSServiceConfig,
eventLoop: EventLoop,
logger: Logger,
Expand Down
2 changes: 1 addition & 1 deletion Sources/SotoCore/Encoder/DictionaryDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ extension __DictionaryDecoder {
return try unbox_(value, as: type) as? T
}

fileprivate func unbox_(_ value: Any, as type: Decodable.Type) throws -> Any? {
private func unbox_(_ value: Any, as type: Decodable.Type) throws -> Any? {
if type == Data.self {
return try self.unbox(value, as: Data.self)
} else if type == Date.self {
Expand Down
30 changes: 15 additions & 15 deletions Sources/SotoXML/XMLEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -468,20 +468,20 @@ extension _XMLEncoder: SingleValueEncodingContainer {

extension _XMLEncoder {
/// Returns the given value boxed in a container appropriate for pushing onto the container stack.
fileprivate func box(_ value: Bool) -> String { return value.description }
fileprivate func box(_ value: Int) -> String { return value.description }
fileprivate func box(_ value: Int8) -> String { return value.description }
fileprivate func box(_ value: Int16) -> String { return value.description }
fileprivate func box(_ value: Int32) -> String { return value.description }
fileprivate func box(_ value: Int64) -> String { return value.description }
fileprivate func box(_ value: UInt) -> String { return value.description }
fileprivate func box(_ value: UInt8) -> String { return value.description }
fileprivate func box(_ value: UInt16) -> String { return value.description }
fileprivate func box(_ value: UInt32) -> String { return value.description }
fileprivate func box(_ value: UInt64) -> String { return value.description }
fileprivate func box(_ value: String) -> String { return value }

fileprivate func box(_ float: Float) throws -> String {
private func box(_ value: Bool) -> String { return value.description }
private func box(_ value: Int) -> String { return value.description }
private func box(_ value: Int8) -> String { return value.description }
private func box(_ value: Int16) -> String { return value.description }
private func box(_ value: Int32) -> String { return value.description }
private func box(_ value: Int64) -> String { return value.description }
private func box(_ value: UInt) -> String { return value.description }
private func box(_ value: UInt8) -> String { return value.description }
private func box(_ value: UInt16) -> String { return value.description }
private func box(_ value: UInt32) -> String { return value.description }
private func box(_ value: UInt64) -> String { return value.description }
private func box(_ value: String) -> String { return value }

private func box(_ float: Float) throws -> String {
guard !float.isInfinite, !float.isNaN else {
guard case .convertToString(
positiveInfinity: let posInfString,
Expand All @@ -504,7 +504,7 @@ extension _XMLEncoder {
return float.description
}

fileprivate func box(_ double: Double) throws -> String {
private func box(_ double: Double) throws -> String {
guard !double.isInfinite, !double.isNaN else {
guard case .convertToString(
positiveInfinity: let posInfString,
Expand Down

0 comments on commit 0ff4dd6

Please sign in to comment.