File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed
crates/bevy_api_gen/src/bin Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -122,19 +122,20 @@ fn main() {
122
122
}
123
123
} ) ;
124
124
let meta_loader = MetaLoader :: new ( vec ! [ output. to_owned( ) ] , workspace_meta) ;
125
- let context = Collect {
126
- crates : crates
127
- . map ( |c| {
128
- let name = c. to_str ( ) . unwrap ( ) . to_owned ( ) ;
129
- log:: info!( "Collecting crate: {}" , name) ;
130
- let meta = meta_loader
131
- . meta_for ( & name)
132
- . expect ( "Could not find meta file for crate" ) ;
133
- Crate { name, meta }
134
- } )
135
- . collect ( ) ,
136
- api_name,
137
- } ;
125
+ let mut crates: Vec < _ > = crates
126
+ . map ( |c| {
127
+ let name = c. to_str ( ) . unwrap ( ) . to_owned ( ) ;
128
+ log:: info!( "Collecting crate: {}" , name) ;
129
+ let meta = meta_loader
130
+ . meta_for ( & name)
131
+ . expect ( "Could not find meta file for crate" ) ;
132
+ Crate { name, meta }
133
+ } )
134
+ . collect ( ) ;
135
+
136
+ crates. sort_by ( |a, b| a. name . cmp ( & b. name ) ) ;
137
+
138
+ let context = Collect { crates, api_name } ;
138
139
let mut context =
139
140
Context :: from_serialize ( context) . expect ( "Could not create template context" ) ;
140
141
You can’t perform that action at this time.
0 commit comments