Pass ending comment to end_block
Clang-format doesn't always like the same ending comment as the start of
the block. In particular it wants:
inline namespace cxxbridge01 {
...
} // namespace cxxbridge01
diff --git a/gen/write.rs b/gen/write.rs
index a2c1b7a..99ea418 100644
--- a/gen/write.rs
+++ b/gen/write.rs
@@ -54,7 +54,7 @@
out.next_section();
write(out, efn, types);
}
- out.end_block();
+ out.end_block("extern \"C\"");
}
for api in apis {
@@ -125,8 +125,8 @@
}
}
}
- out.end_block();
- out.end_block();
+ out.end_block("namespace cxxbridge01");
+ out.end_block("namespace rust");
}
fn write_struct(out: &mut OutFile, strct: &Struct) {
@@ -434,7 +434,7 @@
}
}
}
- out.end_block();
+ out.end_block("extern \"C\"");
out.begin_block("namespace rust");
out.begin_block("inline namespace cxxbridge01");
@@ -445,8 +445,8 @@
}
}
}
- out.end_block();
- out.end_block();
+ out.end_block("namespace cxxbridge01");
+ out.end_block("namespace rust");
}
fn write_rust_box_extern(out: &mut OutFile, ident: &Ident) {