Skip to content

Commit 6ff997e

Browse files
hanabi1224stepancheg
authored andcommitted
Fix generated mod.rs to pass cargo fmt -- --check
1 parent 2bf4397 commit 6ff997e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

protobuf-codegen/src/gen/mod_rs.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ pub(crate) fn gen_mod_rs(mods: &[String]) -> compiler_plugin::GenResult {
55
let v = CodeWriter::with_no_error(|w| {
66
w.comment(&format!("{}generated", "@"));
77
w.write_line("");
8+
let mut mods: Vec<&String> = mods.into_iter().collect();
9+
mods.sort();
810
for m in mods {
911
w.write_line(&format!("pub mod {};", m));
1012
}

0 commit comments

Comments
 (0)