File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ pub struct LineGizmo2dPlugin;
35
35
36
36
impl Plugin for LineGizmo2dPlugin {
37
37
fn build ( & self , app : & mut App ) {
38
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
39
- return ;
40
- } ;
38
+ let render_app = app
39
+ . get_sub_app_mut ( RenderApp )
40
+ . expect ( "RenderPlugin has not been added" ) ;
41
41
42
42
render_app
43
43
. add_render_command :: < Transparent2d , DrawLineGizmo2d > ( )
@@ -63,9 +63,9 @@ impl Plugin for LineGizmo2dPlugin {
63
63
}
64
64
65
65
fn finish ( & self , app : & mut App ) {
66
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
67
- return ;
68
- } ;
66
+ let render_app = app
67
+ . get_sub_app_mut ( RenderApp )
68
+ . expect ( "RenderPlugin has not been added" ) ;
69
69
70
70
render_app. init_resource :: < LineGizmoPipeline > ( ) ;
71
71
render_app. init_resource :: < LineJointGizmoPipeline > ( ) ;
Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ use tracing::error;
38
38
pub struct LineGizmo3dPlugin ;
39
39
impl Plugin for LineGizmo3dPlugin {
40
40
fn build ( & self , app : & mut App ) {
41
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
42
- return ;
43
- } ;
41
+ let render_app = app
42
+ . get_sub_app_mut ( RenderApp )
43
+ . expect ( "RenderPlugin has not been added" ) ;
44
44
45
45
render_app
46
46
. add_render_command :: < Transparent3d , DrawLineGizmo3d > ( )
@@ -61,9 +61,9 @@ impl Plugin for LineGizmo3dPlugin {
61
61
}
62
62
63
63
fn finish ( & self , app : & mut App ) {
64
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
65
- return ;
66
- } ;
64
+ let render_app = app
65
+ . get_sub_app_mut ( RenderApp )
66
+ . expect ( "RenderPlugin has not been added" ) ;
67
67
68
68
render_app. init_resource :: < LineGizmoPipeline > ( ) ;
69
69
render_app. init_resource :: < LineJointGizmoPipeline > ( ) ;
You can’t perform that action at this time.
0 commit comments