Make Formatter Happy

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-04-06 08:50:20 -04:00
parent 68ee5b1067
commit 708f65a0a9
3 changed files with 68 additions and 52 deletions
+10 -10
View File
@@ -34,19 +34,19 @@ public struct Program {
}
/// Retrieve global instances in the compiled P4 program.
///
///
/// Use the given filter to select which of the global instances
/// from the compiled P4 program to retrieve.
///
///
/// If the compiled P4 program (from the source in the
/// string `p4_program_with_control_decl`) has two Control
/// instances and you only want to select the one named simple,
/// you could use a filter like
///
/// @Snippet(path: "use-program-instanceswithtypes", slice: "include")
///
/// @Snippet(path: "use-program-instanceswithtypes", slice: "include")
///
public func InstancesWithTypes(_ filter: TypeFilter) -> [P4Type] {
return self.instances.filter() { instance in
return self.instances.filter { instance in
filter(instance)
}
}
@@ -57,19 +57,19 @@ public struct Program {
}
/// Retrieve global types declared in the compiled P4 program.
///
///
/// Use the given filter to select which of the global types
/// declared in the compiled P4 program to retrieve.
///
///
/// If the compiled P4 program (from the source in the
/// string `p4_program_with_struct_decl`) has two structs declared and
/// you only want to select the one named `agg`, you could
/// use a filter like
///
/// @Snippet(path: "use-program-typeswithtypes", slice: "include")
///
/// @Snippet(path: "use-program-typeswithtypes", slice: "include")
///
public func TypesWithTypes(_ filter: TypeFilter) -> [P4Type] {
return self.types.filter() { instance in
return self.types.filter { instance in
filter(instance)
}
}