Skip to content

Commit

Permalink
cmm: Add trailing commas to wrapped arrays
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Spinale <nick@nickspinale.com>
  • Loading branch information
nspin committed Nov 3, 2023
1 parent 596c413 commit 528e4a6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,5 @@ members = [
"crates/sel4/config/generic/types",
"crates/sel4/config/macros",
"crates/sel4/sys",
"crates/sel4/sys/wrappers"
"crates/sel4/sys/wrappers",
]
2 changes: 1 addition & 1 deletion crates/private/support/sel4-simple-task/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ alloc = [
"sel4-backtrace/alloc",
"sel4-backtrace-simple/alloc",
"sel4-simple-task-threading/alloc",
"serde_json?/alloc"
"serde_json?/alloc",
]
default = ["serde_json", "alloc"]
serde_json = ["dep:serde_json"]
Expand Down
2 changes: 1 addition & 1 deletion crates/sel4-async/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ features = [
"socket-dns",
"socket-tcp",
"async",
"alloc"
"alloc",
]
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ license = "BSD-2-Clause"
[features]
deflate = [
"sel4-capdl-initializer-with-embedded-spec-embedded-spec/deflate",
"sel4-capdl-initializer-with-embedded-spec-embedded-spec-validate/deflate"
"sel4-capdl-initializer-with-embedded-spec-embedded-spec-validate/deflate",
]

[dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,8 @@ impl<'a, P: Policy> FormatterState<'a, P> {
array.iter_mut().for_each(|e| {
e.decor_mut().set_prefix("\n ");
});
array.iter_mut().last().map(|e| {
e.decor_mut().set_suffix("\n");
});
array.set_trailing_comma(true);
array.set_trailing("\n");
}
}
Ok(if let Some(array) = array {
Expand Down

0 comments on commit 528e4a6

Please sign in to comment.