mirror of
https://github.com/apple/swift-nio
synced 2026-11-27 05:04:22 +00:00
Adopt swift-format (#2794)
* Apply formatting
* Apply no block comments rule
* Apply OmitExplicitReturns
* Apple OnlyOneTrailingClosureArgument
* Apply NoAssignmentInExpressions
* Fix up DontRepeatTypeInStaticProperties lint errors
* Apply `OrderedImports`
* Apply `ReplaceForEachWithForLoop`
* format file
* Enable the formatting pipeline
* Adopt `AmbiguousTrailingClosureOverload`
* Fix license header
* Fix format check
* Fix `EndOfLineComment`
* Fix CI
* Adapt CI script to check if changes when running formatting
* Separate lint and format into to steps
* Fix format
* Adopt `UseEarlyExits`
* Revert "Adopt `UseEarlyExits`"
This reverts commit d1ac5bbe12.
This commit is contained in:
1 parent
980bd3e630
commit
c9756e1083
374 files changed
+23992
-14890
No files matched your search
@@ -22,7 +22,7 @@ public struct ByteCount: Hashable, Sendable {
|
||||
/// Returns a ``ByteCount`` with a given number of bytes
|
||||
/// - Parameter count: The number of bytes
|
||||
public static func bytes(_ count: Int64) -> ByteCount {
|
||||
return ByteCount(bytes: count)
|
||||
ByteCount(bytes: count)
|
||||
}
|
||||
|
||||
/// Returns a ``ByteCount`` with a given number of kilobytes
|
||||
@@ -31,7 +31,7 @@ public struct ByteCount: Hashable, Sendable {
|
||||
///
|
||||
/// - Parameter count: The number of kilobytes
|
||||
public static func kilobytes(_ count: Int64) -> ByteCount {
|
||||
return ByteCount(bytes: 1000 * count)
|
||||
ByteCount(bytes: 1000 * count)
|
||||
}
|
||||
|
||||
/// Returns a ``ByteCount`` with a given number of megabytes
|
||||
@@ -40,7 +40,7 @@ public struct ByteCount: Hashable, Sendable {
|
||||
///
|
||||
/// - Parameter count: The number of megabytes
|
||||
public static func megabytes(_ count: Int64) -> ByteCount {
|
||||
return ByteCount(bytes: 1000 * 1000 * count)
|
||||
ByteCount(bytes: 1000 * 1000 * count)
|
||||
}
|
||||
|
||||
/// Returns a ``ByteCount`` with a given number of gigabytes
|
||||
@@ -49,7 +49,7 @@ public struct ByteCount: Hashable, Sendable {
|
||||
///
|
||||
/// - Parameter count: The number of gigabytes
|
||||
public static func gigabytes(_ count: Int64) -> ByteCount {
|
||||
return ByteCount(bytes: 1000 * 1000 * 1000 * count)
|
||||
ByteCount(bytes: 1000 * 1000 * 1000 * count)
|
||||
}
|
||||
|
||||
/// Returns a ``ByteCount`` with a given number of kibibytes
|
||||
@@ -58,7 +58,7 @@ public struct ByteCount: Hashable, Sendable {
|
||||
///
|
||||
/// - Parameter count: The number of kibibytes
|
||||
public static func kibibytes(_ count: Int64) -> ByteCount {
|
||||
return ByteCount(bytes: 1024 * count)
|
||||
ByteCount(bytes: 1024 * count)
|
||||
}
|
||||
|
||||
/// Returns a ``ByteCount`` with a given number of mebibytes
|
||||
@@ -67,7 +67,7 @@ public struct ByteCount: Hashable, Sendable {
|
||||
///
|
||||
/// - Parameter count: The number of mebibytes
|
||||
public static func mebibytes(_ count: Int64) -> ByteCount {
|
||||
return ByteCount(bytes: 1024 * 1024 * count)
|
||||
ByteCount(bytes: 1024 * 1024 * count)
|
||||
}
|
||||
|
||||
/// Returns a ``ByteCount`` with a given number of gibibytes
|
||||
@@ -76,7 +76,7 @@ public struct ByteCount: Hashable, Sendable {
|
||||
///
|
||||
/// - Parameter count: The number of gibibytes
|
||||
public static func gibibytes(_ count: Int64) -> ByteCount {
|
||||
return ByteCount(bytes: 1024 * 1024 * 1024 * count)
|
||||
ByteCount(bytes: 1024 * 1024 * 1024 * count)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user