Make Formatter Happy
Continuous Integration / Library Format Tests (push) Has been cancelled
Continuous Integration / Grammar Tests (push) Failing after 1m30s
Continuous Integration / Library Tests (push) Failing after 8s

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-05-04 10:34:33 -04:00
parent 168d48fa7c
commit 3d4d26d07b
10 changed files with 279 additions and 145 deletions
+2 -1
View File
@@ -304,7 +304,8 @@ public class P4StructValue: P4DataValue {
}
public init(withType type: P4Struct, andInitializers initializers: [P4Value?]) {
let values: [P4Value?] = zip(0..<type.fields.count(), type.fields.fields).map { (index, field) in
let values: [P4Value?] = zip(0..<type.fields.count(), type.fields.fields).map {
(index, field) in
// If there is an initializer for the field, then use it.
if index < initializers.count, let initializer = initializers[index] {
initializer
+1 -1
View File
@@ -81,7 +81,7 @@ public struct Errors: Errorable, CustomStringConvertible {
}
public var description: String {
return self.errors.map() { error in
return self.errors.map { error in
return error.msg()
}.joined(separator: ";")
}
+3 -1
View File
@@ -89,7 +89,9 @@ public func Map<T, U>(input: T, block: (T) -> U) -> U {
@freestanding(expression) public macro RequireOkResult<T>(_: Result<T>) -> Bool =
#externalMacro(module: "Macros", type: "RequireResult")
@freestanding(expression) public macro RequireErrorResult<T>(_: any Errorable, _: Result<T>) -> Bool =
@freestanding(expression) public macro RequireErrorResult<T>(
_: any Errorable, _: Result<T>
) -> Bool =
#externalMacro(module: "Macros", type: "RequireErrorResult")
@freestanding(expression) public macro UseOkResult<T>(_: Result<T>) -> T =
#externalMacro(module: "Macros", type: "UseOkResult")