Skip to content

Commit 468711b

Browse files
committed
chore: sort functions in bevy_api_gen
1 parent d9bfc37 commit 468711b

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

crates/bevy_api_gen/src/passes/populate_template_data.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ pub(crate) fn populate_template_data(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bo
3131

3232
let has_static_methods = fn_ctxts.iter().any(|fn_ctxt| !fn_ctxt.has_self);
3333

34-
let functions = process_functions(ctxt, fn_ctxts);
34+
let mut functions = process_functions(ctxt, fn_ctxts);
35+
functions.sort_by(|a, b| a.ident.cmp(&b.ident));
36+
3537
let variant = ty_ctxt.variant_data.as_ref().unwrap();
3638

3739
let is_tuple_struct = variant.is_struct()

crates/xtask/src/main.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -585,18 +585,15 @@ impl Xtasks {
585585
args.push(command.to_owned());
586586

587587
if command != "fmt" {
588+
// fmt doesn't care about features, workspaces or profiles
589+
588590
args.push("--workspace".to_owned());
589-
}
590591

591-
if let Some(profile) = app_settings.profile.as_ref() {
592-
if command != "fmt" {
592+
if let Some(profile) = app_settings.profile.as_ref() {
593593
args.push("--profile".to_owned());
594594
args.push(profile.clone());
595595
}
596-
}
597596

598-
if command != "fmt" {
599-
// fmt doesn't care about features
600597
args.extend(app_settings.features.to_cargo_args());
601598
}
602599

0 commit comments

Comments
 (0)