Skip to content

Commit d82fea0

Browse files
SarthakSingh31ItsDoot
authored andcommitted
Removed world cell from places where split multable access is not needed (bevyengine#5167)
Fixes bevyengine#5109.
1 parent f82b340 commit d82fea0

File tree

5 files changed

+1
-6
lines changed

5 files changed

+1
-6
lines changed

crates/bevy_pbr/src/render/light.rs

-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ pub struct ShadowPipeline {
217217
// TODO: this pattern for initializing the shaders / pipeline isn't ideal. this should be handled by the asset system
218218
impl FromWorld for ShadowPipeline {
219219
fn from_world(world: &mut World) -> Self {
220-
let world = world.cell();
221220
let render_device = world.resource::<RenderDevice>();
222221

223222
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {

crates/bevy_sprite/src/render/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pub struct SpritePipeline {
3838

3939
impl FromWorld for SpritePipeline {
4040
fn from_world(world: &mut World) -> Self {
41-
let world = world.cell();
4241
let render_device = world.resource::<RenderDevice>();
4342

4443
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {

crates/bevy_ui/src/render/pipeline.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ pub struct UiPipeline {
1010

1111
impl FromWorld for UiPipeline {
1212
fn from_world(world: &mut World) -> Self {
13-
let world = world.cell();
1413
let render_device = world.resource::<RenderDevice>();
1514

1615
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {

examples/shader/animate_shader.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,10 @@ pub struct CustomPipeline {
189189

190190
impl FromWorld for CustomPipeline {
191191
fn from_world(world: &mut World) -> Self {
192-
let world = world.cell();
193192
let asset_server = world.resource::<AssetServer>();
194193
let shader = asset_server.load("shaders/animate_shader.wgsl");
195194

196-
let render_device = world.resource_mut::<RenderDevice>();
195+
let render_device = world.resource::<RenderDevice>();
197196
let time_bind_group_layout =
198197
render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
199198
label: Some("time bind group"),

examples/shader/shader_instancing.rs

-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ pub struct CustomPipeline {
168168

169169
impl FromWorld for CustomPipeline {
170170
fn from_world(world: &mut World) -> Self {
171-
let world = world.cell();
172171
let asset_server = world.resource::<AssetServer>();
173172
asset_server.watch_for_changes().unwrap();
174173
let shader = asset_server.load("shaders/instancing.wgsl");

0 commit comments

Comments
 (0)