Skip to content

Commit 9289a07

Browse files
committed
Fix the mixed_lighting example to use get_cloned_mut.
1 parent 2ed2094 commit 9289a07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/3d/mixed_lighting.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ fn update_lightmaps(
257257
}
258258

259259
// Lightmap exposure defaults to zero, so we need to set it.
260-
if let Some(ref mut material) = materials.get_mut(material) {
260+
if let Some(ref mut material) = materials.get_cloned_mut(material) {
261261
material.lightmap_exposure = LIGHTMAP_EXPOSURE;
262262
}
263263

@@ -279,7 +279,7 @@ fn update_lightmaps(
279279
// Add lightmaps to or remove lightmaps from the sphere.
280280
if &**name == "Sphere" {
281281
// Lightmap exposure defaults to zero, so we need to set it.
282-
if let Some(ref mut material) = materials.get_mut(material) {
282+
if let Some(ref mut material) = materials.get_cloned_mut(material) {
283283
material.lightmap_exposure = LIGHTMAP_EXPOSURE;
284284
}
285285

0 commit comments

Comments
 (0)