@@ -13,7 +13,6 @@ use context::{
13
13
Context , ContextAssigner , ContextBuilder , ContextInitializer , ContextLoadingSettings ,
14
14
ContextPreHandlingInitializer , ScriptContexts ,
15
15
} ;
16
- use docs:: { Documentation , DocumentationFragment } ;
17
16
use event:: ScriptCallbackEvent ;
18
17
use handler:: { CallbackSettings , HandlerFn } ;
19
18
use runtime:: { initialize_runtime, Runtime , RuntimeContainer , RuntimeInitializer , RuntimeSettings } ;
@@ -23,7 +22,6 @@ pub mod asset;
23
22
pub mod bindings;
24
23
pub mod commands;
25
24
pub mod context;
26
- pub mod docs;
27
25
pub mod error;
28
26
pub mod event;
29
27
pub mod handler;
@@ -241,44 +239,3 @@ impl AddRuntimeInitializer for App {
241
239
self
242
240
}
243
241
}
244
-
245
- pub trait StoreDocumentation < D : DocumentationFragment > {
246
- /// Adds a documentation fragment to the documentation store.
247
- fn add_documentation_fragment ( & mut self , fragment : D ) -> & mut Self ;
248
- /// Consumes all the stored documentation fragments, and merges them into one, then generates the documentation.
249
- fn generate_docs ( & mut self ) -> Result < ( ) , Box < dyn std:: error:: Error > > ;
250
- }
251
-
252
- impl < D : DocumentationFragment > StoreDocumentation < D > for App {
253
- fn add_documentation_fragment ( & mut self , fragment : D ) -> & mut Self {
254
- self . world_mut ( )
255
- . init_non_send_resource :: < Documentation < D > > ( ) ;
256
- self . world_mut ( )
257
- . non_send_resource_mut :: < Documentation < D > > ( )
258
- . as_mut ( )
259
- . fragments
260
- . push ( fragment) ;
261
- self
262
- }
263
-
264
- fn generate_docs ( & mut self ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
265
- let mut docs = match self
266
- . world_mut ( )
267
- . remove_non_send_resource :: < Documentation < D > > ( )
268
- {
269
- Some ( docs) => docs,
270
- None => return Ok ( ( ) ) ,
271
- } ;
272
-
273
- let mut top_fragment = match docs. fragments . pop ( ) {
274
- Some ( fragment) => fragment,
275
- None => return Ok ( ( ) ) ,
276
- } ;
277
-
278
- for fragment in docs. fragments . into_iter ( ) {
279
- top_fragment = top_fragment. merge ( fragment) ;
280
- }
281
-
282
- top_fragment. gen_docs ( )
283
- }
284
- }
0 commit comments